# Differential equation from general solution

1. Apr 8, 2008

### Damidami

What if I have the general solution and I want to find the differential equation where it came from?

Say for example my general solution is $$y=sin(ax + b)$$ with $$a$$ and $$b$$ constants.
How could I find the differential equation?

2. Apr 8, 2008

### sutupidmath

I don't know any particular pattern, so i am just guessing. Try to find say the first and second derivative of this function.And after that see if you can find any linear combination equal to zero,or to sth else, of second, first and the originall function

3. Apr 8, 2008

### sutupidmath

Like $$y'=acos(ax+b)$$

$$y=sin(ax+b)$$

$$y''=-a^2sin(ax+b)$$

Now one can easily notice that

$$y''+a^2y=0$$ so i guess this would be one diff eq whose solution would be

$$y=sin(ax+b)$$

4. Apr 8, 2008

### sutupidmath

Now let's try to solve this diff equation

$$y''+a^2y=0$$ and pretend that we actually don't know the solution to it. so

let's guess a solution $$y=e^{rx}$$
$$y''=r^2e^{rx}$$ so the char. eq of that diff. eq is

$$r^2+a^2=0=>r^2=-a^2=>r=\pm a i$$

We know that the general solution of a diff eq. with complex roots is:

$$y=e^{\alpha x}(c_1cos(\beta x)+c_2sin(\beta x))$$

Now we have $$\alpha =0, \beta=a$$ so the general solution to our diff. eq would be:

$$y=e^{x0}(acos(ax)+bsin(ax))=c_1cos(ax)+c_2sin(ax)$$ Which is the same as our original answer;

$$y=sin(ax+b)=sin(ax)cosb+cos(ax)sinb=c_1cos(ax)+c_2sin(ax)$$

notice that

$$cos(b)=c_1, sinb=c_2$$ these are constants.

Wow, it worked out! I'm glad...lol....

5. Apr 9, 2008

### HallsofIvy

Staff Emeritus
Basically your objective is to eleminate the parameters, here a and b, by differentiating and algebraically manipulating the equations. Typically, you will need as many derivatives as you have parameters to do that. Since you have two parameters here you would expect to result in a second order differential equation.

Sutupid Math did that quite nicely for you.