# What is a solution to the differential equation dy/dx=1+2xy?

What is a solution to the differential equation $\frac{dy}{dx}=1+2xy$?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Amiya Watkins
$\frac{dy}{dx}=1+2xy$
$\therefore \frac{dy}{dx}-2xy=1$ ..... [1]

This is a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{dy}{dx}+P\left(x\right)y=Q\left(x\right)$

This is a standard form of a Differential Equation that can be solved by using an Integrating Factor:

$I={e}^{\int P\left(x\right)dx}$

And if we multiply the DE [1] by this Integrating Factor we will have a perfect product differential;

$\frac{dy}{dx}-2xy=1$
$\therefore {e}^{-{x}^{2}}\frac{dy}{dx}-2xy{e}^{-{x}^{2}}=1\cdot {e}^{-{x}^{2}}$
$\therefore \frac{d}{dx}\left(y{e}^{-{x}^{2}}\right)={e}^{-{x}^{2}}$

This has converted our DE into a First Order separable DE which we can now just separate the variables to get;

The RHS integral does not have an elementary form, but we can use the definition of the Error Function :

Which gives us:

$y{e}^{-{x}^{2}}=\frac{\sqrt{\pi }}{2}\text{erf}\left(x\right)+A$
$y=\frac{\sqrt{\pi }}{2}{e}^{{x}^{2}}\text{erf}\left(x\right)+A{e}^{{x}^{2}}$