Gregory Emery

2022-01-01

${y}^{\prime }+\frac{1}{x}y=\mathrm{cos}\left(x\right)$

vrangett

Given: ${y}^{\prime }+\frac{1}{x}y=\mathrm{cos}x$
Solution:
${y}^{1}+\frac{1}{x}y=\mathrm{cos}x$
comparing with the equation
${y}^{\prime }+p\left(x\right)y=q\left(x\right)$
$p\left(x\right)=\frac{1}{x},q\left(x\right)=\mathrm{cos}x$
$M=\text{Integrating factor}={e}^{\int p\left(x\right)dx}$
$={e}^{\int \frac{1}{x}dx}$
$={e}^{\mathrm{ln}x}$
$m=x$
general solution is,

$xy=x\mathrm{sin}x-\int 1\cdot \mathrm{sin}xdx$
$xy=x\mathrm{sin}x-\int \mathrm{sin}xdx$
$xy=x\mathrm{sin}x-\left(-\mathrm{cos}x\right)+c$
$xy=x\mathrm{sin}x+\mathrm{cos}x+c$

yotaniwc

${y}^{\prime }+\frac{1}{x}y=\mathrm{cos}x$
Integrating factor $P\left(x\right)=\frac{1}{x}$
${e}^{\int \frac{1}{x}dx}={e}^{\mathrm{ln}|x|}=x$
$x\frac{dy}{dx}=x\mathrm{cos}x$
$\left[xy\right]\frac{d}{dx}=x\mathrm{cos}x$
$xy=\int x\mathrm{cos}x$
$xy=x\mathrm{sin}x+\mathrm{cos}x+c$
$y=\frac{x\mathrm{sin}x+\mathrm{cos}x+c}{x}$
$y=\mathrm{sin}x+\frac{\mathrm{cos}x}{x}+\frac{c}{x}$

Do you have a similar question?