# 2nd order DE

• August 13th 2009, 02:53 PM
Bushy
2nd order DE
I have an equation y''+y=0 with y(0)=1 and y'(0)=0

It has general solution of y=Asin(x)+Bcos(x) ?

with condition gives 1 = 0 + B so B=1

If so y' = Acos(x)-sin(x)

with condition gives 0 = A - 0 so A=0

Therefore the solution is y = cos(x)

And if so does anything change to the general solution if I am solving

y''+4y=0 with y(0)=1 and y'(0)=0 ?

Thank you!
• August 13th 2009, 03:14 PM
Jester
Quote:

Originally Posted by Bushy
I have an equation y''+y=0 with y(0)=1 and y'(0)=0

It has general solution of y=Asin(x)+Bcos(x) ?

with condition gives 1 = 0 + B so B=1

If so y' = Acos(x)-sin(x)

with condition gives 0 = A - 0 so A=0

Therefore the solution is y = cos(x)

Yes!

Quote:

And if so does anything change to the general solution if I am solving

y''+4y=0 with y(0)=1 and y'(0)=0 ?

Yes - $
y = A \sin 2x +B \cos 2x
$
• August 13th 2009, 03:18 PM
Bushy
Quote:

Originally Posted by Danny
Yes - $
y = A \sin 2x +B \cos 2x
$

Is this because in general differentiating sin(2x) and cos(2x) twice will give me -4sin(2x) and -4cos(2x) ?
• August 13th 2009, 03:40 PM
Twig
Hi!

If you have $y''+4y=0$ , you have what is known as the characteristic equation.

In this case it becomes $r^{2}+4=0$ , which clearly has no real solutions. You get $r^{2}=-2$ , which gives $r=\pm 2i$

So the general solution becomes $A\cdot cos(2x) + B\cdot sin(2x)$ .

In general, if you get a solution to the characteristic equation, in the form

$a+bi$ , then the homogenous solution is $e^{ax}(Acos(bx)+Bsin(bx))$
• August 13th 2009, 03:56 PM
Bushy
Thank you, this makes sense.