# Differential equation from general solution

## Main Question or Discussion Point

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?

Related Differential Equations News on Phys.org
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

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

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

HallsofIvy