1. ## 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!

2. 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!

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
$

3. 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) ?

4. 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))$

5. Thank you, this makes sense.