Are My Solutions for 2nd Order ODE Real-Valued?

  • Thread starter amcavoy
  • Start date
  • Tags
    Ode
In summary: So even if the coefficients are complex, as long as the function is defined for real numbers and gives real values, it can be considered a real function.In summary, the conversation discusses finding real-valued solutions for a differential equation. The solutions are found using Euler's Identity, but the final solution involves both real and imaginary parts. However, it is clarified that for a function to be considered real, it only needs to output real values for real inputs. Therefore, the solution on Wikipedia is correct and the conversation ends with a discussion on complex numbers and real functions.
  • #1
amcavoy
665
0
2nd Order ODE

y''+y=0

I come up with the solutions of y1=c1eix, y2=c2e-ix. Now, using these I try to find the cooresponding real-valued solutions:

eix=cos(x)+isin(x)

e-ix=cos(x)-isin(x)

Both of which have real-valued solutions cos(x). However, when I looked this up online, Wikipedia stated that the answer was y=c1sin(x)+c2cos(x). Am I doing something wrong here? Thanks.
 
Last edited:
Physics news on Phys.org
  • #2
both [tex] y_{1} = c_{1} e^{ix} [/tex] and [tex]y_{2} = c_{2} e^{-ix} [/tex] are solutions
Also when you add them up that too is a solution.
So when you add both the Y1 and Y2 solutions you should get the solution on wikipedia
 
  • #3
apmcavoy said:
y''+y=0

I come up with the solutions of y1=c1eix, y2=c2e-ix. Now, using these I try to find the corresponding real-valued solutions:

eix=cos(x)+isin(x)

e-ix=cos(x)-Iain(x)
What you are stating here is Euler's Identity, it is not derived from the solution of the differential equation but is the starting point for going from the imaginary exponential solution to the real valued trig solution.

Both of which have real-valued solutions cos(x). However, when I looked this up online, Wikipedia stated that the answer was y=c1sin(x)+c2cos(x). Am I doing something wrong here? Thanks.
All that separates you from the trig solution is Euler's and some algebra. Realize that the constants in the final solution will not be the same as the constants in your original solution.
 
  • #4
stunner5000pt said:
both [tex] y_{1} = c_{1} e^{ix} [/tex] and [tex]y_{2} = c_{2} e^{-ix} [/tex] are solutions
Also when you add them up that too is a solution.
So when you add both the Y1 and Y2 solutions you should get the solution on wikipedia

Unfortunately I don't. Adding those together gives the following:

[tex]c_1e^{ix}+c_2e^{-ix}=\left(c_1+c_2\right)\cos{x}+i\left(c_1-c_2\right)\sin{x}=A\cos{x}+Bi\sin{x}[/tex]

...which is not a real solution. Any ideas?

Thanks again.
 
  • #5
if
y=a*exp(i*x)+b*exp(-i*x)
let
c=(a+b)/2
d=(a-b)/(2*i)
then
y=c*cos(x)+d*sin(x)
if you presume x real
y=Re[y]+i*Im[y]
={(Re[a]+Re)*cos(x)-(Im[a]sin(x)-Re)*sin(x)}+i*{(Im[a]+Im)*cos(x)+(Re[a]-Re)*sin(x)}
so for Im[y]=0 (real solution) it is required that
Im[a]+Im=0
Re[a]-Re=0
which is clearly equivalent to
Im[a+b]=0
Re[a-b]=0
 
  • #6
[tex]c_1e^{ix}+c_2e^{-ix}=\left(c_1+c_2\right)\cos{x}+i\left(c_1-c_2\right)\sin{x}=A\cos{x}+Bi\sin{x}[/tex]
It looks like a real solution to me... (if you choose A and B properly...)
 
  • #7
Hurkyl said:
It looks like a real solution to me... (if you choose A and B properly...)

This seems strange to me. Let's say that B=k/i, which would cancel out the i in front of the sine. But now the coefficient isn't a real number. How can a solution be real if it contains complex numbers?
 
  • #8
apmcavoy said:
This seems strange to me. Let's say that B=k/i, which would cancel out the i in front of the sine. But now the coefficient isn't a real number. How can a solution be real if it contains complex numbers?
If the imaginary part is 0
ie the imaginary numbers cancel
is
1+i-i
real?
how about
i/i
e^(pi*i)
i^2
i^i
0*i
cos(i)
real?
2cos(pi/9) is a root of x^3-3x-1
the other roots are 2cos(7pi/9) and 2cos(13pi/9)
thus all are real.
The roots can be expressed in radicals, but only if complex numbers are used.
 
  • #9
To be a real function, all that is required is that when you plug in a real number, you get a real number out of it.
 

1. What is a 2nd Order ODE?

A 2nd Order ODE, or second-order ordinary differential equation, is a mathematical equation that involves a function, its derivatives, and independent variables. It is called "second-order" because it involves the second derivative of the function.

2. What types of problems can be solved using 2nd Order ODEs?

2nd Order ODEs are used to model many physical phenomena, such as motion, heat transfer, and electrical circuits. They can also be used to solve problems in economics, biology, and engineering.

3. How do you solve a 2nd Order ODE?

There are several methods for solving 2nd Order ODEs, including separation of variables, variation of parameters, and the Laplace transform. Specific techniques will depend on the form of the equation and the initial conditions.

4. What is the difference between a homogeneous and non-homogeneous 2nd Order ODE?

A homogeneous 2nd Order ODE has all terms involving the function and its derivatives, while a non-homogeneous equation also includes a function of the independent variable. The solutions to homogeneous equations are often simpler and can be found using basic algebraic techniques.

5. How are 2nd Order ODEs used in real-world applications?

2nd Order ODEs are used to model and solve problems in a variety of fields, including engineering, physics, and economics. They can help predict the behavior of systems and provide insight into complex processes. For example, they are used to design control systems for robots and to model the spread of diseases in populations.

Similar threads

  • Introductory Physics Homework Help
Replies
17
Views
360
  • Calculus and Beyond Homework Help
Replies
3
Views
811
Replies
2
Views
725
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
29
Views
882
  • Differential Equations
Replies
1
Views
2K
Replies
3
Views
781
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
805
  • Introductory Physics Homework Help
Replies
6
Views
220
Back
Top