0
$\begingroup$

I'm trying to find the solution to ${y}''=-9y$

I've worked out that ${y}=\cos(-3x)+\sin(-3x)$ seems to fit, but the book says that the initial conditions should be ${y}(0)=1$ and ${y}'(0)=0$

But when I plug $0$ into this function I don't get $0$ ${y}'(0)= 3\sin(-3x)-3\cos(-3x) = -3$

Where am I going wrong?

$\endgroup$
2
$\begingroup$

Here is a full solution for reference.

Note that the characteristic equation is $r^2+9=0$. The solutions to this are $r=0\pm3i$, so we know that the general solution to our differential equation is in the form

$$y=c_1e^{0x}\cos(3x)+c_2e^{0x}\sin(3x)=c_1\cos(3x)+c_2\sin(3x)$$

for some real constants $c_1$ and $c_2$.

Now we can plug in our initial conditions to find our solution. The initial condition $1=y(0)$ gives us

$$1=c_1\cos(0)+c_2\sin(0)=c_1$$

while the initial condition $0=y'(0)$ gives us

$$0=-3c_1\sin(0)+3c_2\cos(0)=3c_2$$

Hence $c_1=1$ and $c_2=0$. This gives us our final solution of

$$y=\cos(3x)$$

$\endgroup$
6
$\begingroup$

You forgot the constants..the general solution is of the form: $$ y = A\sin(3x) + B\cos(3x) $$ So try to pick constants $A$ and $B$ to fit the conditions.

Your solution is saying that $A=B=1$ but your initial conditions are saying otherwise.

First bit $$ y(0) = A\sin(3\cdot 0) + B \cos(3\cdot 0)= B $$ What must $B$ be to satisfy the condition on $y$?

$\textbf{edit}$

Oops I forgot to mention you also got the argument of your sines and cosines wrong it should not be $-3x$ a common mistake when people come across these Simple hamonic motion equations.

$\endgroup$
  • 1
    $\begingroup$ I don't think the argument of the sines and cosines matters since we have $\cos(x)=\cos(-x)$ and $\sin(x)=-\sin(-x)$ - in essence all it will do is change the sign of your $A$ constant (though probably things will look prettier if there is no "$-$" sign in the arguments). $\endgroup$ – Peter Woolfitt Dec 31 '14 at 10:35
  • $\begingroup$ You are right. I just a little biased with the way I was taught. Though I am laughing at myself now since I have never thought about it like that .. With using the property of the odd parity with the sines.. $\endgroup$ – Chinny84 Dec 31 '14 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.