# Solve the following differential equations: (i)(2x+y+3)dy/dx=x+2y+1 and (ii)[x^(2)+1]dy/dx+2xy=4x^(2).?

Apr 14, 2018

See below.

#### Explanation:

Solve the following differential equations:
(i)$\left(2 x + y + 3\right) \frac{\mathrm{dy}}{\mathrm{dx}} = x + 2 y + 1$.
(ii)$\left({x}^{2} + 1\right) \frac{\mathrm{dy}}{\mathrm{dx}} + 2 x y = 4 {x}^{2}$.?

i)

Making

$\left\{\begin{matrix}u = x + 2 y + 1 \\ v = 2 x + y + 3\end{matrix}\right.$

we have

$\left\{\begin{matrix}y = \frac{1}{3} \left(2 u - v + 1\right) \\ x = \frac{1}{3} \left(2 v - u - 5\right)\end{matrix}\right.$

and also

$\left\{\begin{matrix}\mathrm{dy} = \frac{1}{3} \left(2 \mathrm{du} - \mathrm{dv}\right) \\ \mathrm{dx} = \frac{1}{3} \left(2 \mathrm{dv} - \mathrm{du}\right)\end{matrix}\right.$

and also

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{2 \mathrm{du} - \mathrm{dv}}{2 \mathrm{dv} - \mathrm{du}}$ or

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{2 - \frac{\mathrm{dv}}{\mathrm{du}}}{2 \frac{\mathrm{dv}}{\mathrm{du}} - 1} = \frac{u}{v}$ or

$\frac{\mathrm{dv}}{\mathrm{du}} = \frac{u + 2 v}{2 u + v}$

now making $v = \lambda u \Rightarrow \frac{\mathrm{dv}}{\mathrm{du}} = \frac{\mathrm{dl} a m b \mathrm{da}}{\mathrm{du}} u + \lambda$

we have after that new transformation

$\frac{\mathrm{du}}{u} = \frac{\lambda + 2}{1 - {\lambda}^{2}} \mathrm{dl} a m b \mathrm{da}$ giving

$\ln u = \frac{1}{2} \left(\ln \left(1 + \lambda\right) - 3 \ln \left(1 - \lambda\right)\right) + {C}_{0}$ then

${u}^{2} = {C}_{1}^{2} \frac{1 + \lambda}{1 - \lambda} ^ 3$ or

${u}^{2} {\left(1 - \frac{v}{u}\right)}^{3} = {C}_{1}^{2} \left(1 + \frac{v}{u}\right)$ or

${\left(u - v\right)}^{3} / u = {C}_{1}^{2} \frac{v + u}{u}$ or

${\left(u - v\right)}^{3} = {C}_{1}^{2} \left(u + v\right)$

and finally

${\left(x + y + 2\right)}^{3} + {C}_{1}^{2} \left(3 x + 3 y + 4\right) = 0$ as the general solution for i)

ii)

$\left({x}^{2} + 1\right) y ' + 2 x y = 4 {x}^{2}$

This is a common linear differential equations with solutions easily obtainable as

$y = \frac{1}{{x}^{2} + 1} \left(\frac{4}{3} {x}^{3} + {C}_{0}\right)$

Apr 14, 2018

(i) $\setminus 3 y + 3 x + 4 = C {\left(y - x - 2\right)}^{3}$

(ii) $y = \frac{\frac{4}{3} {x}^{3} + C}{1 + {x}^{2}}$

#### Explanation:

ODE (i)

We have:

$\left(2 x + y + 3\right) \frac{\mathrm{dy}}{\mathrm{dx}} = x + 2 y + 1$

Which we can write as:

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{x + 2 y + 1}{2 x + y + 3}$ ..... [A]

Our standard toolkit for DE's cannot be used. However we can perform a transformation to remove the constants from the linear numerator and denominator.

Consider the simultaneous equations

$\left\{\begin{matrix}x + 2 y + 1 = 0 \\ 2 x + y + 3 = 0\end{matrix}\right. \implies \left\{\begin{matrix}x = - \frac{5}{3} \\ y = \frac{1}{3}\end{matrix}\right.$

As a result we perform two linear transformations:

Let $\left\{\begin{matrix}u = x + \frac{5}{3} \\ v = y - \frac{1}{3}\end{matrix}\right. \iff \left\{\begin{matrix}x = u - \frac{5}{3} \\ y = v + \frac{1}{3}\end{matrix}\right. \implies \left\{\begin{matrix}\frac{\mathrm{dx}}{\mathrm{du}} = 1 \\ \frac{\mathrm{dy}}{\mathrm{dv}} = 1\end{matrix}\right.$

And if we substitute into the DE [A] we get

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\left(u - \frac{5}{3}\right) + 2 \left(v + \frac{1}{3}\right) + 1}{2 \left(u - \frac{5}{3}\right) + \left(v + \frac{1}{3}\right) + 3}$

$\setminus \setminus \setminus \setminus \setminus \setminus = \frac{u - \frac{5}{3} + 2 v + \frac{2}{3} + 1}{2 u - \frac{10}{3} + v + \frac{1}{3} + 3}$

$\setminus \setminus \setminus \setminus \setminus \setminus = \frac{u + 2 v}{2 u + v}$

And utilising the chain rule we have:

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{dv}} \frac{\mathrm{dv}}{\mathrm{du}} \frac{\mathrm{du}}{\mathrm{dx}} \implies \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dv}}{\mathrm{du}}$

Thus we have a transformed equation

$\frac{\mathrm{dv}}{\mathrm{du}} = \frac{u + 2 v}{2 u + v}$ ..... [B]

This is now in a form that we can handle using a substitution of the form $v = w u$ which if we differentiate wrt $u$ using the product gives us:

$\frac{\mathrm{dv}}{\mathrm{du}} = \left(w\right) \left(\frac{d}{\mathrm{du}} u\right) + \left(\frac{d}{\mathrm{du}} w\right) \left(u\right) = w + u \frac{\mathrm{dw}}{\mathrm{du}}$

Using this substitution into our modified DE [B] we get:

$\setminus \setminus \setminus \setminus \setminus w + u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{u + 2 w u}{2 u + w u}$

$\therefore w + u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{u + 2 w u}{2 u + w u}$

$\therefore u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{u + 2 w u}{2 u + w u} - w$

$\therefore u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{\left(u + 2 w u\right) - w \left(2 u + w u\right)}{2 u + w u}$

$\therefore u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{u + 2 w u - 2 u w - {w}^{2} u}{2 u + w u}$

$\therefore u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{u \left(1 - {w}^{2}\right)}{u \left(2 + w\right)}$

$\therefore u \frac{\mathrm{dw}}{\mathrm{du}} = \frac{1 - {w}^{2}}{2 + w}$

This is now a separable DE, so we can rearrange and separate the variables to get:

$\int \setminus \frac{2 + w}{1 - {w}^{2}} \setminus \mathrm{dw} = \int \setminus \frac{1}{u} \setminus \mathrm{du}$

$\therefore \int \setminus \frac{2}{1 - {w}^{2}} + \frac{w}{1 - {w}^{2}} \setminus \mathrm{dw} = \int \setminus \frac{1}{u} \setminus \mathrm{du}$

$\therefore \int \setminus \frac{2}{\left(1 + w\right) \left(1 - w\right)} + \frac{w}{1 - {w}^{2}} \setminus \mathrm{dw} = \int \setminus \frac{1}{u} \setminus \mathrm{du}$

And utilising a Partial Fraction decomposition:

$\int \setminus \frac{1}{w + 1} - \frac{1}{w - 1} + \frac{w}{1 - {w}^{2}} \setminus \mathrm{dw} = \int \setminus \frac{1}{u} \setminus \mathrm{du}$

Which is now readily integrable (giving:

$\ln | w + 1 | - \ln | w - 1 | - \frac{1}{2} \ln | {w}^{2} - 1 | = \ln | u | + \ln C$

This is now an algebraic problem, and we get:

$\ln | w + 1 \frac{|}{|} w - 1 | - \ln \sqrt{{w}^{2} - 1} = \ln | C u |$

$\therefore \ln \left(| w + 1 \frac{|}{| w - 1 | \sqrt{{w}^{2} - 1}}\right) = \ln | C u |$

$\therefore | w + 1 \frac{|}{| w - 1 | \sqrt{{w}^{2} - 1}} = | C u |$

And squaring we get:

${\left(w + 1\right)}^{2} / \left({\left(w - 1\right)}^{2} \left({w}^{2} - 1\right)\right) = {C}^{2} {u}^{2}$

$\therefore {\left(w + 1\right)}^{2} / \left({\left(w - 1\right)}^{2} \left(w + 1\right) \left(w - 1\right)\right) = A {u}^{2}$

$\therefore \frac{w + 1}{{\left(w - 1\right)}^{3}} = A {u}^{2}$

Then restoring the earlier $w$ substitution, using $w = \frac{v}{u}$ we get:

$\frac{v}{u} + 1 = A {u}^{2} {\left(\frac{v}{u} - 1\right)}^{3}$

$\therefore \frac{v + u}{u} = A {u}^{2} {\left(\frac{v - u}{u}\right)}^{3}$

$\therefore \frac{v + u}{u} = A {u}^{2} {\left(v - u\right)}^{3} / {u}^{3}$

$\therefore v + u = A {\left(v - u\right)}^{3}$

$\therefore v + u = A {\left(v - u\right)}^{3}$

Finally, we restore the earlier substitutions for $u$ and $v$, using:

$\left\{\begin{matrix}u = x + \frac{5}{3} \\ v = y - \frac{1}{3}\end{matrix}\right.$

Giving us:

$\left(y - \frac{1}{3}\right) + \left(x + \frac{5}{3}\right) = A {\left(\left(y - \frac{1}{3}\right) - \left(x + \frac{5}{3}\right)\right)}^{3}$

$\therefore y + x + \frac{4}{3} = A {\left(y - \frac{1}{3} - x - \frac{5}{3}\right)}^{3}$

$\therefore 3 y + 3 x + 4 = C {\left(y - x - 2\right)}^{3}$

Which is the General Solution, in implicit form.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

ODE (ii)

$\left({x}^{2} + 1\right) \frac{\mathrm{dy}}{\mathrm{dx}} + 2 x y = 4 {x}^{2}$

We can write this as:

$\frac{\mathrm{dy}}{\mathrm{dx}} + \frac{2 x}{1 + {x}^{2}} y = \frac{4 {x}^{2}}{1 + {x}^{2}}$

We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

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

As the equation is already in this form, then the integrating factor is given by;

$I = \exp \left(\int \setminus P \left(x\right) \setminus \mathrm{dx}\right)$
$\setminus \setminus = \exp \left(\int \frac{2 x}{1 + {x}^{2}} \setminus \mathrm{dx}\right)$
$\setminus \setminus = \exp \left(\ln | 1 + {x}^{2} |\right)$
$\setminus \setminus = 1 + {x}^{2}$

And if we multiply the DE by this Integrating Factor, $I$, we will end up with the original equation, which we should note was in standard form:

Thus, we can write the equation as a perfect product differential;

$\frac{d}{\mathrm{dx}} \left(\left({x}^{2} + 1\right) y\right) = 4 {x}^{2}$

This is now separable, so by "separating the variables" we get:

$\left({x}^{2} + 1\right) y = \int \setminus 4 {x}^{2} \setminus \mathrm{dx}$

This is directly integrable, so doing so gives us:

$\left({x}^{2} + 1\right) y = \frac{4}{3} {x}^{3} + C$

$y = \frac{\frac{4}{3} {x}^{3} + C}{1 + {x}^{2}}$

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Validation of Solutions: ODE (i)

Taking the solution:

$3 y + 3 x + 4 = C {\left(y - x - 2\right)}^{3}$

We have via Implicit Differentiation:

$3 \frac{\mathrm{dy}}{\mathrm{dx}} + 3 = 3 C {\left(y - x - 2\right)}^{2} \left(\frac{\mathrm{dy}}{\mathrm{dx}} - 1\right)$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} + 1 = C {\left(y - x - 2\right)}^{2} \frac{\mathrm{dy}}{\mathrm{dx}} - C {\left(y - x - 2\right)}^{2}$

$\therefore \left(C {\left(y - x - 2\right)}^{2} - 1\right) \frac{\mathrm{dy}}{\mathrm{dx}} = C {\left(y - x - 2\right)}^{2} + 1$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{C {\left(y - x - 2\right)}^{2} + 1}{C {\left(y - x - 2\right)}^{2} - 1}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{C {\left(y - x - 2\right)}^{2} + 1}{C {\left(y - x - 2\right)}^{2} - 1} \cdot \frac{y - x - 2}{y - x - 2}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{\left(3 y + 3 x + 4\right) + \left(y - x - 2\right)}{\left(3 y + 3 x + 4\right) - \left(y - x - 2\right)}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{3 y + 3 x + 4 + y - x - 2}{3 y + 3 x + 4 - y + x + 2}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{4 y + 2 x + 2}{2 y + 4 x + 6}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \frac{2 y + x + 1}{y + 2 x + 3} \setminus \setminus \setminus$ QED

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Validation of Solutions: ODE (ii)

Taking the solution:

$y = \frac{\frac{4}{3} {x}^{3} + C}{1 + {x}^{2}} \implies \left(1 + {x}^{2}\right) y = \frac{4}{3} {x}^{3} + C$

We have via Implicit Differentiation, and the product rule:

$\left(1 + {x}^{2}\right) \frac{\mathrm{dy}}{\mathrm{dx}} + \left(2 x\right) y = 4 {x}^{2} \setminus \setminus \setminus \setminus$ QED