# Thread: 2nd order differential equation problem

1. ## 2nd order differential equation problem

I just wanted to confirm I did this right.

"Verify by substitution that the given function is a solution of the given differential equation."

Given:
x^2 y'' - xy' + 2y = 0
y = x*cos( ln(x) )

My work:
y' = cos(ln(x)) - sin(ln(x))
y'' = -(1/x) * ( sin(ln(x)) + cos(ln(x)) )

Substituting back in to the differential equation:
x^2 (-(1/x)(sin(ln(x)) + cos(ln(x)))) - x(cos(ln(x)) - sin(ln(x))) - 2(xcos(ln(x)) = 0

-xsin(ln(x)) - xcos(ln(x)) - xcos(ln(x)) + xsin(ln(x)) + 2x*cos(ln(x)) = 0

0 = 0

Does this mean I verified the solution? See I'm confused because in first order diff. equations I would just separate out the x's and y's and integrate both sides and get my y equation. This is a little different apparently.

2. ## Re: 2nd order differential equation problem

Originally Posted by nautica17
Does this mean I verified the solution?
Yes, you have proved that the given function is a solution of the differential equation.

See I'm confused because in first order diff. equations I would just separate out the x's and y's and integrate both sides and get my y equation. This is a little different apparently.
The order of the equation is irrelevant. One thing is to solve a differential equation and another thing is to verify that a given function is a solution.

3. ## Re: 2nd order differential equation problem

Originally Posted by FernandoRevilla
Yes, you have proved that the given function is a solution of the differential equation.

The order of the equation is irrelevant. One thing is to solve a differential equation and another thing is to verify that a given function is a solution.
The DE...

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

... is 'Euler's type' and a particular solution of it has the form $x^{\alpha}$. Substituting $x^{\alpha}$ in (1) You arrive at the algebraic equation...

$\alpha^{2}-2\ \alpha +2 =0$ (2)

...the solution of which are $1 \pm i$, so that the general solution of (1) is...

$y(x)=c_{1}\ x\ (\cos \ln x +i\ \sin \ln x) + c_{2}\ x\ (\cos \ln x -i\ \sin \ln x)$ (3)

Of course if You want a real solution it must be $c_{1}=c_{2}=c$...

Kind regards

$\chi$ $\sigma$

4. ## Re: 2nd order differential equation problem

Originally Posted by chisigma
The DE...

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

... is 'Euler's type' and a particular solution of it has the form $x^{\alpha}$. Substituting $x^{\alpha}$ in (1) You arrive at the algebraic equation...

$\alpha^{2}-2\ \alpha +2 =0$ (2)

...the solution of which are $1 \pm i$, so that the general solution of (1) is...

$y(x)=c_{1}\ x\ (\cos \ln x +i\ \sin \ln x) + c_{2}\ x\ (\cos \ln x -i\ \sin \ln x)$ (3)

Of course if You want a real solution it must be $c_{1}=c_{2}=c$...

Kind regards

$\chi$ $\sigma$
This confirms that it is not the same to find the general solution of a DE that verify that a given function is a solution of a DE.

5. ## Re: 2nd order differential equation problem

Originally Posted by chisigma
The DE...

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

... is 'Euler's type' and a particular solution of it has the form $x^{\alpha}$. Substituting $x^{\alpha}$ in (1) You arrive at the algebraic equation...

$\alpha^{2}-2\ \alpha +2 =0$ (2)

...the solution of which are $1 \pm i$, so that the general solution of (1) is...

$y(x)=c_{1}\ x\ (\cos \ln x +i\ \sin \ln x) + c_{2}\ x\ (\cos \ln x -i\ \sin \ln x)$ (3)

Of course if You want a real solution it must be $c_{1}=c_{2}=c$...

Kind regards

$\chi$ $\sigma$
My answer has been a little hurried so that what i wrote is not precise... the general solution of the De is...

$y(x)=c_{1}\ x\ (\cos \ln x +i\ \sin \ln x) + c_{2}\ x\ (\cos \ln x -i\ \sin \ln x)$ (1)

... bue $c_{1}$ and $c_{2}$ may be complex, so that the general real solution is...

$y(x)= x\ (a_{1}\ \cos \ln x + a_{2}\ \sin \ln x)$

... where $a_{1}$ and $a_{2}$ are 'arbitrary real constants'...

Kind regards

$\chi$ $\sigma$