# Thread: Analytical Solution of Ordinary Differential Equation

1. ## Analytical Solution of Ordinary Differential Equation

Ive had a few attempts at trying to answer this question but have been unsuccessful. Can anyone guide me through the answer so I know how to do it.

Differential Equation ---> y'=(2/x)y+(x^2)(e^x)

Show that the analytical solution is given by ---> y(x) = x^2(e^x - e)

2. ## Re: Analytical Solution of Ordinary Differential Equation

The question just asks to verify the given solution. Use this solution in the left- and right-hand sides of your differential equation and show that they are equal.

3. ## Re: Analytical Solution of Ordinary Differential Equation

Originally Posted by NFS1
Ive had a few attempts at trying to answer this question but have been unsuccessful. Can anyone guide me through the answer so I know how to do it.

Differential Equation ---> y'=(2/x)y+(x^2)(e^x)

Show that the analytical solution is given by ---> y(x) = x^2(e^x - e)
If you are going to solve the DE

\displaystyle \begin{align*} \frac{dy}{dx} &= \left(\frac{2}{x}\right)y + x^2e^x \\ \frac{dy}{dx} - \left(\frac{2}{x}\right)y &= x^2e^x \end{align*}

Now multiplying both sides by the Integrating Factor \displaystyle \begin{align*} e^{\int{-\frac{2}{x}\,dx}} = e^{-2\ln{x}} = e^{\ln{\left(x^{-2}\right)}} = x^{-2} \end{align*} gives

\displaystyle \begin{align*} x^{-2}\,\frac{dy}{dx} - 2x^{-3}y &= e^x \\ \frac{d}{dx}\left(x^{-2}y\right) &= e^x \\ x^{-2}y &= \int{e^x\,dx} \\ x^{-2}y &= e^x + C \\ y &= x^2\left(e^x + C\right) \end{align*}

Obviously C = e is a possibility.

4. ## Re: Analytical Solution of Ordinary Differential Equation

NFS1, do you understand that, as John D Malcolm said, this problem does NOT ask you to find the general solution? In this case it is fairly straightforward to solve, as Prove It showed, but you might have equations in the future that are much harder or impossible to solve in general- but it is easy to show that a given function satisfies the equation.

5. ## Re: Analytical Solution of Ordinary Differential Equation

Differential equation ----> xy'' + y' = x^2 can be written as d/dx(xy')=x^2 find analytical solution

So using steps Prove It has shown

> xy'=int(x^2)dx
> xy'=(x^3)/3
> y'=(x^2)/3
> y = (x^3)/9 as the analytical solution??

6. ## Re: Analytical Solution of Ordinary Differential Equation

As HallsofIvy and JohnD have said

> y=(x^3)/9
> y'=(x^2)/3
> y''=2x/3

substituting these into left and right hand side

>(2x^2)/3 + (x^2)/3 = x^2
>(3x^2)/3 = x^2
> x^2 = x^2

so they both equal and therefore my analytical solution is y=(x^3)/9 correct?

7. ## Re: Analytical Solution of Ordinary Differential Equation

Originally Posted by NFS1
Differential equation ----> xy'' + y' = x^2 can be written as d/dx(xy')=x^2 find analytical solution

So using steps Prove It has shown

> xy'=int(x^2)dx
> xy'=(x^3)/3
> y'=(x^2)/3
> y = (x^3)/9 as the analytical solution??