chillywilly12a

2021-02-24

Solve the linear equations by considering y as a function of x, that is, $y=y\left(x\right).$
$\frac{dy}{dx}+\left(\frac{1}{x}\right)y=x$

lobeflepnoumni

Variation of parameters
First, solve the linear homogeneous equation by separating variables.
Rearranging terms in the equation gives
$\frac{dy}{dx}=-\frac{y}{x}⇔\frac{dy}{y}=-\frac{dx}{x}$
Now, the variables are separated, x appears only on the right side, and yonly on the left.
Integrate the left side in relation to y, and the right side in relation to x
$\int \frac{dy}{y}=-\int \frac{dx}{x}$
Which is
$\mathrm{ln}|y|=-\mathrm{ln}|x|+c$
By taking exponents, we obtain
$|y|={e}^{-\mathrm{ln}|x|+c}=\frac{1}{|x|}\cdot {e}^{c}$
Hence,we obtain
$y=\frac{1}{C}x$
where $C\phantom{\rule{0.222em}{0ex}}=±{e}^{c}\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}{y}_{c}=\frac{1}{x}$ is the complementary solution .
Next, we need to find the particular solution ${y}_{p}$.
Therefore, we consider $u{y}_{c}$, and try to find u, a function of x, that will makethis work.
Let's assume that $u{y}_{c}$ is a solution of the given equation. Hence, it satisfiesthe given equation.
Substituting $u{y}_{c}$, and its derivative in the equation gives
${\left(u{y}_{c}\right)}^{\prime }+\frac{u{y}_{c}}{x}=x$
${u}^{\prime }{y}_{c}+u{y}_{c}^{\prime }+\frac{u{y}_{c}}{x}=x$

since ${y}_{c}$ is a solution
Therefore,
${u}^{\prime }{y}_{c}=x⇒{u}^{\prime }=\frac{x}{{y}_{c}}$
which gives
$u=\int \frac{x}{{y}_{c}}dx$
Now, we can find the function u:
$u=\int \left(\frac{x}{\frac{1}{x}}\right)dx$
$=\int {x}^{2}dx$
$=\frac{{x}^{3}}{3}+c$
Since we need to find only one function that will male this work, we don’tneed to introduce the constant of integration c. Hence,
$u=\frac{{x}^{3}}{3}$
Recall that ${y}_{p}=u{y}_{c}$
Therefore
${y}_{p}=\frac{1}{x}\cdot \frac{{x}^{3}}{3}$
$=\frac{{x}^{2}}{3}$
The general solution is
$y=C{y}_{c}+{y}_{p}$
$=\frac{C}{x}+\frac{{x}^{2}}{3}$
Integrating Factor technique
This equation is linear with $P\left(x\right)=\frac{1}{x}\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}Q\left(x\right)=x$
Hence, $h=\int \frac{1}{x}=\mathrm{ln}|x|$
So, an integrating factor is