cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Need help with integration

resonator80
1-Newbie

Need help with integration

Can somebody help me with this integral? It works for t =1 and t =2. Somewhere above that it fails. I need to go to at least t = 4.

Thanks,
Bill Edelstein
Baltimore, MD
6 REPLIES 6

Your exponential is changing much too rapidly for numeric integration. Break the integral into four parts, over each of which f(x) is constant, and do the integral analytically.
__________________
� � � � Tom Gutman

Here's a solution using the symbolic processor. Note how inaccurate the numeric solutions are, even when calculated. Also note that you still have accuracy issues, due to the large arguments to the trig functions.
__________________
� � � � Tom Gutman

On 11/24/2009 5:25:05 PM, resonator80 wrote:
>Can somebody help me with this
>integral? It works for t =1
>and t =2. Somewhere above that
>it fails. I need to go to at
>least t = 4.
>
>Thanks,
>Bill Edelstein
>Baltimore, MD
_______________________________

Attach an *.gif image of the function. I will try a quadrature and try Mathematica because they have an error message pertaining to each case of numerical integration. But if you have a symbolic integral function, then done .

jmG



Dear Tom and JM,

Thanks very much for your suggestions. I think the
analytic approach works.

I changed each of the exponential functions to a
modulo argument, i.e. 1920*t went to
mod(1920*t, 2*pi) and got exactly the same answer
Tom had without use of modulo arithmetic. So I guess
Mathcad knows about modulo arithmetic.

I will continue in this vein.

Thanks again,
Regards,
Bill Edelstein
Baltimore, MD

Yes, modulo arithmetic is inherent in the evaluation of trigonometric functions. That's the part that causes loss of accuracy for large arguments. Remember, mod(a,b) is a-n·b for some integer n. If a is much larger than b a and n·b will be very similar numbers. And so you have the usual loss of precision when subtracting to nearly equal numbers.
__________________
� � � � Tom Gutman

On 11/24/2009 11:59:19 PM, resonator80 wrote:
...
>modulo arithmetic...
>I will continue in this vein.
>
>Thanks again,
>Regards,
>Bill Edelstein
>Baltimore, MD
______________________________

"modulo arithmetic" = modular arithmetic

Read more
http://en.wikipedia.org/wiki/Modular_exponentiation

Luke, Hart, Cody ... will be useful reading
about numerical approximation of functions.

jmG




Top Tags