Solving an ODE with eulers formula.

In summary, the conversation discusses using Euler's formula to find a particular solution for the equation y''+y'+2y=sin(x)+cos(x). It is mentioned that using Ae^{ix} is not appropriate and that Ae^{ix} + Be^{-ix} or Ccosx + Dsinx should be used instead. It is also noted that in this case, B can be set to 0. The conversation also touches on taking the real or imaginary parts and using Euler's formula to its full potential.
  • #1
cragar
2,552
3
If I have [itex] y''+y'+2y=sin(x)+cos(x) [/itex]
can I just say [itex] y=Ae^{ix} [/itex]
and then find y' and y'' and then plug them in and solve for A.
so I get that [itex] A= \frac{1}{1+i} [/itex]
then i multiply and divided by the complex conjugate.
then I back substitute in Eulers formula.
now since I have my original equation has both a real and an imaginary part.
when I multiply out A times Eulers formula, I will take both real and imaginary parts.
and I get that y=sin(x) and tested this and it works.
But is what i did with Eulers formula ok.
 
Physics news on Phys.org
  • #2
hi cragar! :smile:
cragar said:
If I have [itex] y''+y'+2y=sin(x)+cos(x) [/itex]
can I just say [itex] y=Ae^{ix} [/itex]

not really :redface:

for a particular solution for an RHS of sinx + cosx, you should use Aeix + Be-ix

(or Ccosx + Dsinx)

in this case, you're lucky that B = 0 :biggrin:

(but don't do it again! :wink:)
 
  • #3
if i substitute what you said. Do I take the real or imaginary part in the end. Or do I just take it all.
 
  • #4
you take it all :smile:

but if you're expecting a real solution anyway, you might as well use Ccosx + Dsinx in the first place! :wink:

(technically, C and D are both complex, but they'll come out real)
 
  • #5
thanks for your answers. I like to push the limits of Eulers formula. And see what it can do.
 

1. What is an ODE?

An ODE, or ordinary differential equation, is a mathematical equation that involves a function and its derivatives. It is used to model many real-world phenomena such as motion, population growth, and chemical reactions.

2. What is Euler's formula?

Euler's formula is a mathematical equation that relates the exponential function, trigonometric functions, and the imaginary unit (i). It is commonly written as e^(ix) = cos(x) + i*sin(x) and is used in solving differential equations.

3. How is Euler's formula used to solve ODEs?

Euler's formula is used in a numerical method called Euler's method to approximate the solution of an ODE. By substituting the function and its derivative into the formula, we can find the value of the function at a given point.

4. What are the limitations of using Euler's method?

Euler's method is a basic and simple method for solving ODEs, but it has limitations. It can only provide an approximate solution, and the accuracy decreases as the step size increases. It also cannot handle complex ODEs or those with discontinuous solutions.

5. Are there other methods for solving ODEs besides Euler's method?

Yes, there are many other numerical methods for solving ODEs, such as the Runge-Kutta method and the Adams-Bashforth method. These methods offer higher accuracy and can handle more complex ODEs, but they are more computationally intensive.

Similar threads

  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
2K
Replies
3
Views
791
Replies
4
Views
929
  • Classical Physics
Replies
3
Views
607
  • Differential Equations
Replies
2
Views
986
  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • General Math
Replies
3
Views
809
Back
Top