Does assigning a large value to a variable do the job of var -- inf well?
3 views (last 30 days)
Show older comments
In symbolic matlab there is limit(f,x, inf) but in non-symbolic calculation...?
2 Comments
Stephen23
on 3 May 2020
Original question posted by Mirlan Karimov, recovered from Google Cache:
Does assigning a large value to a variable do the job of var -- inf well?
In symbolic matlab there is limit(f,x, inf) but in non-symbolic calculation...?
Answers (1)
John D'Errico
on 27 Apr 2020
Edited: John D'Errico
on 3 May 2020
Be serious. Does it do the job well? Yes. Or definitely not. Probably maybe, approximately so. To answer your question completely would take writing a book about limits, about numerical analysis. I could as easily give an example where the use of any large number is a terrible approximation. Another example where it is great.
Lets see, what is the sum as n--> inf of the terms 1/(n + log(n))? Is the infinite series convergent or divergent? How many terms do you need to convince yourself of the solution?
How about computing the sum as n--> inf of 1/n^2? How large does n need to be?
What is the limit as x --> inf, of erfc(x)? How large does x need to be that the result is close to the true value?
How many terms are needed for convergence of the Taylor series for sin(x) to within some tolerance? If x=0.1? x=5? x=100?
The point is, how large does large need to be is completely problem dependent. Knowing the answer requires understanding the mathematics of what you are doing.
0 Comments
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!