Solving an unknown under exponential series

3 views (last 30 days)
KB
KB on 14 Jun 2014
Commented: Roger Stafford on 27 Jun 2014
Hello, I have an exponential series
y = sum (1/n^2 exp((-n^2)(x)(t));
where y has different values for t = 1 to 100 , and n = 1 to 1000 , x is unknown, a is a constant. I want to get the value of unknown x ? Any kind of help is appreciated.I have attached the pdf file with equations for better understanding.
  5 Comments
KB
KB on 26 Jun 2014
I have attached pdf file with equations exactly what it looks like. The X value is always constant and it has a single value that needs to be find out. Y will have different values at different t.
Roger Stafford
Roger Stafford on 27 Jun 2014
Kanishka, the equation you have finally shown us, is actually for the sum of an infinite series. You should be careful about computing the case t = 0. In that case your answer for y would just be the Riemannn Zeta function at an argument of 2 whose precise value is known to be pi^2/6 and does not depend on X. Unfortunately your series converges very slowly for t = 0 and the sum of the first 100 terms will be off from the correct sum in the second decimal place:
sum(1./(1:100).^2) = 1.63498390018489
pi^2/6 = 1.64493406684823

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 14 Jun 2014
Edited: Star Strider on 14 Jun 2014
Lacking information, I have to guess as to how your data are organised.
I assume here that y is a matrix for different values of t and n. Since you are finding only one value, x, I would use the fzero function in a loop.
Example:
yfn = @(x,t,n) sum (1./n.^2 .* exp((-n.^2).*x.*t));
t = 1:10:100;
n = 1:100:1000;
for k1 = 1:length(t)
for k2 = 1:length(n)
fn = @(x) norm(y(k1,k2) - yfn(x,t,n))
x(k1,k2) = fzero(fn, 1);
end
end
Your x values then become a matrix with one value for each value of t and n. Given the nature of your data, curve fitting functions such as nlinfit, lsqcurvefit, and fminsearch would be inappropriate.
Note: This is demonstration code, and while it runs, considering the fact that you are taking the exponential of a very large number, I doubt you will get any useful results. I used your function as you wrote it, and also note that it quickly becomes huge. Reconsider your function. You will likely need to rewrite it, but I still cannot guarantee you will get any useful results with values of n and t as large as they are.
Have fun!
  1 Comment
John D'Errico
John D'Errico on 14 Jun 2014
Edited: John D'Errico on 14 Jun 2014
Note that it is a NEGATIVE exponential, assuming that x is positive. So in fact, there will probably be very few terms needed in the sum, as most of them will be identically zero in double precision since they will underflow. Even better, one can stop the summation long before you get to that point.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!