# Linear Differential Equation:

• Nov 12th 2009, 06:33 AM
kjchauhan
Linear Differential Equation:

$x^2\frac{d^2 y}{dx} - 2x(1+x)\frac{dy}{dx}+2(1+x)y=x^2$

I need solution of this equation..
• Nov 12th 2009, 10:12 AM
jeneverboy
If I remember correctly; you first calculate the homogeneous solution. And then the particular solution for the non-homogeneous part.
• Nov 19th 2009, 05:48 AM
chisigma
Deviding both terms by $x^{2}$ the DE becomes...

$y^{''} - 2\cdot \frac{1+x}{x}\cdot y^{'} + 2\cdot \frac{1+x}{x^{2}}\cdot y = 1$ (1)

First step is the solution of 'incomplete equation' ...

$y^{''} - 2\cdot \frac{1+x}{x}\cdot y^{'} + 2\cdot \frac{1+x}{x^{2}}\cdot y = 0$ (2)

... that is of the type...

$y^{''} + p(x) \cdot y^{'} + q(x)\cdot y = 0$ (3)

A DE like (3) can often be solved in terms of an auxiliary function $u(x)$ defined as...

$\ln y = \ln u -\frac{1}{2}\cdot \int p(x)\cdot dx$ (4)

Deriving both terms of (4) we obtain first ...

$\frac {y^{'}}{y} = \frac{u^{'}}{u} - \frac{1}{2}\cdot p(x)$ (5)

... deriving again...

$\frac{y\cdot y^{''}}{y^{2}} - (\frac{y^{'}}{y})^{2}= \frac{u\cdot u^{''}}{u^{2}} - (\frac{u^{'}}{u})^{2} - \frac{1}{2}\cdot p^{'} (x)$ (6)

... and then with two more steps...

$\frac{y^{''}}{y}= \frac{u^{''}}{u}+\frac{1}{4}\cdot p^{2}(x) -\frac{1}{2}\cdot p^{‘}(x)$ (7)

Taking into account (7) the (3) can be written in terms of $u(x)$ as...

$u^{''} + \theta(x)\cdot u =0$ (8)

... where...

$\theta(x)= q(x) - \frac{1}{4}\cdot p^{2}(x) -\frac{1}{2}\cdot p^{'}(x)$ (9)

A little pause before proceeding...

Kind regards

$\chi$ $\sigma$
• Nov 19th 2009, 06:44 AM
chisigma
In the last post we have 'attacked' the 'incomplete' DE...

$y^{''} - 2\cdot \frac{1+x}{x}\cdot y^{'} + 2\cdot \frac{1+x}{x^{2}}\cdot y = 0$ (1)

... swapping the y with the u variable defined as...

$\ln y = \ln u -\frac{1}{2}\cdot \int p(x)\cdot dx$ (2)

... and we are arrived to the DE...

$u^{''} + \theta(x)\cdot u= 0$ (3)

... where...

$\theta (x)= q(x) - \frac{1}{4}\cdot p^{2} (x) - \frac{1}{2}\cdot p^{'} (x)$ (4)

In our case we have...

$p(x)= -2\cdot (1+\frac{1}{x})$, $q(x)= \frac{2}{x}\cdot (1+\frac{1}{x})$ (5)

... so that...

$y= u\cdot x\cdot e^{x}$ , $\theta(x)=-1$ (6)

The (6) shows us that the solution of (1) in terms of $u$ is relatively 'easy' and is...

$u(x)= c_{1}\cdot e^{-x}+ c_{2}\cdot e^{x}$ (7)

... so that is...

$y(x)= c_{1}\cdot x+c_{2}\cdot x\cdot e^{2x}$ (8)

The solution of the 'complete' DE is left for further study...

Kind regards

$\chi$ $\sigma$
• Nov 19th 2009, 06:58 AM
shawsend
Hi Chisigma. I get $\theta(x)=-1$. Or no?
• Nov 19th 2009, 08:49 AM
Jester
Quote:

Originally Posted by kjchauhan

$x^2\frac{d^2 y}{dx} - 2x(1+x)\frac{dy}{dx}+2(1+x)y=x^2$

I need solution of this equation..

Just a note. Sometimes a clever substitution works very well. Your ODE can be written as

$x^2\frac{d^2 y}{dx} - 2(1+x)\left( x \frac{dy}{dx} - y\right)=x^2$.

If you let

$
u = x \frac{dy}{dx} - y\;\;\;(1)
$
then your entire problem reduces to

$x \frac{du}{dx} - 2(x+1)u = x^2$ a linear ODE! Once you solve this then go to (1) and solve again a linear ODE.
• Nov 19th 2009, 09:08 AM
shawsend
Continuing with Chisigma's solution, then I'll finish it if that's alright. I'll use variation of parameter:

Then $u(x)=c_1 e^{x}+c_2 e^{-x}$ and therefore $y(x)=\left(c_1 e^{x}+c_2 e^{-x}\right) \exp\left(\int_x (1/z+1)dz\right)=\left(c_1 e^{x}+c_2 e^{-x}\right) xe^{x}=c_1 x e^{2x}+c_2 x$

Let $y(x)=A(x) xe^{2x}+B(x) x$

Substituting that into the original DE we obtain the following two equations to solve:

$A'xe^{2x}+B'x=0$

$A'(2xe^{2x}+e^{2x})+B'=x^2$

Then $B'=-A'e^{2x}$

Substituting that one into the second one, I get $A'=1/2x e^{-2x}$ or $B'=-1/2 x$ so that $B(x)=-1/4 x^2$ and $A(x)=-1/8 e^{-2x}-1/4 x e^{-2x}$ in which we drop the arbitrary constants in this case since we're only looking for a particular solution to add to the complimentary solution.

Therefore, the general solution is $y(x)=c_1 xe^{2x}+c_2 x-1/4 x^3+xe^{2x}\left(-1/8 e^{-2x}-1/4 x e^{-2x}\right)$

or:

$y(x)=c_1 x e^{2x}+c_2 x-1/4 x^3-1/4 x^2$