Carol Gates

2020-10-28

Solve the linear equations by considering y as a function of x, that is, $y=y\left(x\right).x{y}^{\prime }+\left(1+x\right)y={e}^{-x}\mathrm{sin}2x$

Elberte

Expert

Variation of parameters
First, solve the linear homogeneous equation by separating variables.
Rearranging terms in the equation gives
$x{y}^{\prime }=-\left(1+x\right)y⇔\frac{dy}{dx}=-\frac{\left(1+x\right)y}{x}⇔\frac{d}{y}=-\frac{\left(1+x\right)dx}{x}$
Now, the variables are separated, x appears only on the right side, and y only on the left.
Integrate the left side in relation to y, and the right side in relation to x
$x{y}^{\prime }=-\left(1+x\right)y⇔\frac{dy}{dx}=-\frac{\left(1+x\right)y}{x}⇔\frac{d}{y}=-\frac{\left(1+x\right)dx}{x}$
Let’s solve the integral on the right side.
$\int \frac{\left(1+x\right)dx}{x}=\int \left(\frac{1}{x}+\frac{x}{x}\right)dx$
$=\int \left(\frac{1}{x}+1\right)dx$
$=\int \frac{dx}{x}+\int dx$
$=\mathrm{ln}|x|+x+c$
Therefore,
$\mathrm{ln}|y|=-\mathrm{ln}|x|-x+c$
By taking exponents, we obtain
$|y|={e}^{-\mathrm{ln}|x|-x+c}=\frac{1}{|x|{e}^{x}}\cdot e\cdot c$
Hence,we obtain
$y=\frac{C}{x{e}^{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{e}^{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 make this work.
Let’s assume that $u{y}_{c}$, is a solution of the given equation. Hence, it satisfies the given equation.
Write the equation in the standard form (divide it by x 4 0)
${y}^{\prime }+\frac{\left(1+x\right)y}{x}=\frac{{e}^{-x}\mathrm{sin}2x}{x}$
Substituting $displaysty\le \left\{u\right\}{\left\{y\right\}}_{\left\{c\right\}}$ and its derivative in the equation gives
$u{y}_{c}$
${\left(u{y}_{c}\right)}^{\prime }+\frac{\left(1+x\right)u{y}_{c}}{x}=\frac{{e}^{-x}\mathrm{sin}2x}{x}$

Do you have a similar question?