2.4.1.1 Solved using first_order_ode_linear
Entering first order ode linear solver
\[\begin {aligned} y^{\prime }+y x&=x \end {aligned}\]
In canonical form a linear first order is
\begin{align*} y^{\prime } + q(x)y &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=x\\ p(x) &=x \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int x d x}\\ &= {\mathrm e}^{\frac {x^{2}}{2}} \end{align*}
The ode becomes
\begin{gather*} \begin {aligned} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (x\right )\\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left ({\mathrm e}^{\frac {x^{2}}{2}} y\right ) &= \left ({\mathrm e}^{\frac {x^{2}}{2}}\right ) \left (x\right )\\ \mathrm {d} \left ({\mathrm e}^{\frac {x^{2}}{2}} y\right ) &= \left (x \,{\mathrm e}^{\frac {x^{2}}{2}}\right )\, \mathrm {d} x \end {aligned} \end{gather*}
Integrating gives
\begin{align*} {\mathrm e}^{\frac {x^{2}}{2}} y&= \int {x \,{\mathrm e}^{\frac {x^{2}}{2}} \,dx} \\ &={\mathrm e}^{\frac {x^{2}}{2}} + c_1 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{\frac {x^{2}}{2}}\) gives the final solution
\[ y = 1+{\mathrm e}^{-\frac {x^{2}}{2}} c_1 \]
|
|
|
| Direction field with Isoclines | Direction field |
Summary of solutions found
\[
y = 1+{\mathrm e}^{-\frac {x^{2}}{2}} c_1
\]