Solving an ODE with integrating factor

198 Views Asked by At

How can I solve this ODE ?

$$y'-xy=e^x\tag*{}$$


My approach :

Here, integrating factor,

$$\begin{align}\mu &=e^{\int (-x)\, \mathrm{d}x}\\ &=e^{-x^2/2}\end{align}\tag*{}$$

So, after multiplying by the integrating factor, the ODE becomes

$$\begin{align}ye^{-x^2/2} &= \displaystyle \int e^x e^{-x^2/2}\, \mathrm dx \end{align}\tag*{}$$

The last integral can't be expressed in terms of elementary functions I think. Is there any way to proceed from here ? If there is any mistake in my method, please point it out.

1

There are 1 best solutions below

4
On BEST ANSWER

First of all: what do you define as a non usual integral?

Secondly we can write the integral in terms of the error function:

$$\int\exp\left(x-\frac{x^2}{2}\right)\space\text{d}x=\sqrt{\frac{e\pi}{2}}\cdot\text{erf}\left(\frac{x-1}{\sqrt{2}}\right)+\text{C}\tag1$$