Need help coding with TI-89. Int{sin(x),x,0,inf}

  • Context: Calculators 
  • Thread starter Thread starter DyslexicHobo
  • Start date Start date
  • Tags Tags
    Coding Ti-89
Click For Summary

Discussion Overview

The discussion revolves around coding a Laplace transform function on the TI-89 calculator, specifically focusing on the integral of the sine function from 0 to infinity. Participants explore the challenges of evaluating this integral and the derivation of Laplace transforms for sine and cosine functions.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their attempt to code the Laplace transform function using the definition of the integral but encounters issues with transcendental functions like sine.
  • Another participant suggests rewriting sine and cosine as imaginary exponentials to simplify the calculations, referencing external resources for clarification.
  • Some participants assert that the integral of sine from 0 to infinity does not exist, emphasizing the role of the exponential term in ensuring convergence.
  • There is a discussion about defining the variable s as greater than zero to ensure convergence of the exponential term.
  • One participant expresses frustration over the lack of time spent on derivations in their engineering curriculum, indicating a desire for deeper understanding.
  • Another participant provides a mathematical expression for sine in terms of exponentials and discusses the integration process, suggesting integration by parts as a potential method.
  • Concerns are raised about the calculator's ability to handle limits and undefined values when evaluating sine at infinity.
  • Participants clarify that the Laplace transform of sine is mathematically sound, despite confusion regarding the integral's existence.

Areas of Agreement / Disagreement

Participants generally agree that the integral of sine from 0 to infinity does not exist without the exponential term, but there is disagreement about the implications of this for coding on the TI-89. The discussion remains unresolved regarding the best approach to implement the Laplace transform in code.

Contextual Notes

There are limitations in the discussion regarding assumptions about convergence and the handling of complex numbers in the context of the TI-89's capabilities. The participants also express varying levels of understanding about the derivation of Laplace transforms.

DyslexicHobo
Messages
249
Reaction score
0
I'm trying to code a laplace transform function into my calculator. Right now, I'm doing it by definition:
\int{e^{-st}*f(t)dt} from 0 to \infty

But whenever I try to use a transcendental function, it loops infinitely. I figured this is because the calculator cannot evaluate \int{sin(x)dx} from 0 to \infty.

I'm not exactly sure how to the laplace transforms are derived for sin(x) and cos(x) using the definition, so I can't even code some sort of if statement to use a separate derivation.

Can anyone help? Thanks!
 
Computer science news on Phys.org
You need to write the sines and cosines as imaginary exponentials and then simplify to the familiar results as is done on this page:

http://cnyack.homestead.com/files/alaplace/lapfun1.htm

For your program this means you need to detect cases involving sines and cosines and have them automatically rewritten as exponentials.
 
Well, certainly, the TI-89 or any other calculator won't do it- that integral doesn't exist! The Laplace transform of sin(x) is, just as you state,
\int_0^\infty e^{-sx}sin(x)dx
and it is that "e^{-sx}" that makes it converge.
 
Oh sorry. I should have been more explicit. I'm defining s>0. That makes e^{-s*t} converge, correct?

Or were you talking about sin(x) not converging as x->infinity?

I understand how to resolve imaginary numbers into their real and imaginary parts (we needed to learn this in order to understand some methods for solving differential equations), but I don't understand how to
write the sines and cosines as imaginary exponentials and then simplify to the familiar results

I'm really disappointed how little time we get to spend on the derivations of a lot of the formulas we use. I'm an engineering major so they cram Calc 2, calc 3 (linear algebra), diff eq into 2 semesters.
 
sin(x)= \frac{e^{ix}- e^{-ix}}{2i}[/itex] <br /> so <br /> \int sin(x)e^{-sx} dx= \frac{-i}{2}\int e^{(i-s)x}- e^{(-i-s)x}dx<br /> <br /> Though I think it would be much simpler just to integrate the original form using integration by parts.<br /> <br /> But I do not understand why you are saying that you TI89 will not do that. Certainly what you put in your title, Int{sin(x),x,0,inf}, the TI89 cannot do because it does not exist, but with the exponential, it does exist.
 
Using integration by parts, won't the calculator eventually try to evaluate sin(\infty) and return undefined?

But if I have a statement in the code that converts sin(x) to \frac{e^{ix}-e^{-ix}}{2i} then evaluate the limit after I integrate, it will work?

Edit: Oh, I see how it works! Thanks for your help. I completely forgot about that step in the process of resolving sin(x) into its real and imaginary components.
 
HallsofIvy said:
Well, certainly, the TI-89 or any other calculator won't do it- that integral doesn't exist! The Laplace transform of sin(x) is, just as you state,
\int_0^\infty e^{-sx}sin(x)dx
and it is that "e^{-sx}" that makes it converge.
I don't think I understand you here. We learned that L\{sin(bx)\} = \frac{b}{s^2+b^2}

Is that not a mathematically sound definition? The class is "Math for engineering analysis" so I guess the teacher feels that we only need to know HOW to do it as opposed to how it's derived. It leaves me with a lot of questions, though. :(Edit: Oh, I see where some of the confusion could have been coming from. I meant to say "trigonometric" in the first post, not "transcendental".
 
Last edited:

Similar threads

Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
13K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 1 ·
Replies
1
Views
7K