# Simple ODE question

1. Dec 2, 2008

### bsodmike

y' = -y + sin(t)

The solution should be $$y(t)= \dfrac{3}{2}e^{-t}+\dfrac{1}{2}\left({sin(t)-cos(t)}\right)$$

Thanks
Mike

P.S. this is not a homework question (i.e. I no longer go to school/uni in the first place) but this is stated in 'Adv. Numerical Methods and Analysis'. They simply state that the solution is such and such as obtained from any undergrad ODE course.

Last edited: Dec 2, 2008
2. Dec 2, 2008

### Defennder

No, we're still not allowed to solve it for you even if it's not homework. To start you off here, bring over the -y to the left side. Do you recognise the form of the ODE?

3. Dec 2, 2008

### bsodmike

Not really. I know for examples like,

$$\dfrac{dx}{dt}=tx$$

Can be analytically solved by going,

$$\dfrac{dx}{x}=tdt$$

And integrating both sides, to yield (for example), $$x = e^{\dfrac{t^2}{2}}$$. Thanks for your help, I guess I'm going to remain stuck on this :(

4. Dec 2, 2008

### bsodmike

Can you give me an idea on how to manipulate this form of Ode. I'll check stroud when I get home and see if I can figure it out. Cheers

Ps this is in my adv numerical book as the analytical solution to an example of euler's method. Would be great if I can figure of out.

5. Dec 5, 2008

6. Dec 5, 2008

### maze

You can always plug the solution back into the DE to demonstrate it is, in fact, a solution.

The general method would be
1) Think hard/do numerics
2) Guess solution
3) Check that it works

(-:

7. Dec 5, 2008

### bsodmike

Actually, I managed to solve it here with Dick's help.

It was great practice, thanks :)