Solving an unknown under exponential series

4 visualizzazioni (ultimi 30 giorni)
KB
KB il 14 Giu 2014
Commentato: Roger Stafford il 27 Giu 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 Commenti
KB
KB il 26 Giu 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 il 27 Giu 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

Accedi per commentare.

Risposte (1)

Star Strider
Star Strider il 14 Giu 2014
Modificato: Star Strider il 14 Giu 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 Commento
John D'Errico
John D'Errico il 14 Giu 2014
Modificato: John D'Errico il 14 Giu 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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by