# Solve differential equation if you now two solutions

1. Nov 24, 2013

### skrat

1. The problem statement, all variables and given/known data
Let $y_1(x)= e^x$ and $y_2=x^2+1+e^x$ solve the differential equation $y^{'}+b(x)y=c(x)$.

Find the overall solution of this differential equation.

2. Relevant equations

3. The attempt at a solution
The overall solution => $y=y_H+y_P$ I don't know the english expression for that but in general the idea behind is that differential equations can be seen as homogeneous and inhomogeneous.

If $y_1(x)= e^x$ and $y_2=x^2+1+e^x$ solve the equation than their $y_1-y_2$ also solves the equation. But I am not sure which part? Homogeneous or inhomogeneous?

I would like to say that the right answer is homogeneous part but than the overall solution would be like $y= e^x-A(x^2+1)$

Does this sound right? :/

2. Nov 24, 2013

### hilbert2

Yes, the function $y_{1}-y_{2}$ is a solution to the homogenous equation. You get the general solution of the homogenous case by noting that also $C(y_{1}-y_{2})$, where $C$ is any constant, is a solution. Now you only add a particular solution of the inhomogenous case to this solution, and you have the general solution of the full inhomogenous equation.

3. Nov 24, 2013

### ehild

b(x) and c(x) are not given, but they are obtained knowing two solutions of the equation.
Once you know b(x) and c(x), you can find the general solution of the homogeneous equation, yh. Adding any particular solution (which can be any linear combination of y1 and y2, independent from yh), you get the general solution.

ehild

4. Nov 24, 2013

### skrat

Well this complicates this problem A LOT:

If $y_1(x)= e^x$ and $y_2(x)=x^2+1+e^x$ solve the differential equation $y^{'}+b(x)y=c(x)$

Than $y_1^{'}(x)= e^x$ and $y_2^{'}(x)=2x+e^x$ and

$e^x+b(x)e^x=c(x)$ and $2x+e^x+b(x)(x^2+1+e^x)=c(x)$. Multiplying the first equation with -1 and them summing both of them together gives:

$2x+b(x)2x+b(x)x^2=0$

$b(x)=\frac{-2}{2+x}$ and accordingly $c(x)=e^x\frac{x}{2+x}$

Original equation is than written as:

$y^{'}+b(x)y=y^{'}+\frac{-2}{2+x}y=e^x\frac{x}{2+x}$

Now I have to find homogeneous and non homogeneous part in order to find the general solution? That's sounds like a lot of work.

So, the only reason than $y_1$ and $y_2$ are given is so I can find b(x) and c(x)?

3. The attempt at a solution
The overall solution => $y=y_H+y_P$ I don't know the english expression for that but in general the idea behind is that differential equations can be seen as homogeneous and inhomogeneous.

If $y_1(x)= e^x$ and $y_2=x^2+1+e^x$ solve the equation than their $y_1-y_2$ also solves the equation. But I am not sure which part? Homogeneous or inhomogeneous?

I would like to say that the right answer is homogeneous part but than the overall solution would be like $y= e^x-A(x^2+1)$

Does this sound right? :/

5. Nov 24, 2013

### ehild

You made some mistake, it should be $b(x)=\frac{-2x}{x^2+1}$

The homogeneous part of the equation is y'+b(x)y=0. Substitute the correct b(x) and c(x) and solve. Or substitute your trial solution into the homogeneous equation and see if it is a solution.

You get the general solution of the equation if you add a particular solution of the inhomogeneous equation to the general solution of the homogeneous equation. Yes, the general solution is $y= e^x-A(x^2+1)$ where A is an arbitrary constant.

ehild

Last edited: Nov 24, 2013