Solving an unknown under exponential series
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
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
  Roger Stafford
      
      
 2014년 6월 27일
				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
답변 (1개)
  Star Strider
      
      
 2014년 6월 14일
        
      편집: Star Strider
      
      
 2014년 6월 14일
  
      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
  John D'Errico
      
      
 2014년 6월 14일
				
      편집: John D'Errico
      
      
 2014년 6월 14일
  
			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.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



