0
$\begingroup$

I have the following IVP (Initial value problem, Cauchy-Problem), and I do not know how to solve this.

$$y'=e^{-x}-\frac{y}{x} \qquad \qquad y(1)=2$$

I hope you can help me, cause I really do not know how to start.

Thank you! :)

  • 0
    Use the fact that this is a separable ODE.2017-01-25

3 Answers 3

2

\begin{align} \frac{dy}{dx}+\frac yx&=e^{-x}\\ &\text{IF:}e^{\int\frac1xdx}=x\\ &yx=\int xe^{-x}dx\\ &=-(x+1)e^{-x}+c\\ &\text{putting the initial value $x=1,y=2$}\\ &2=-2e^{-1}+c\\ &c=2+\frac2e\\ &\text{our Ans is: $yx=-(x+1)e^{-x}+2+\frac2e$} \end{align}

1

First, one need to solve the homogeneous differential equation associated to the original equation, that is: $$ y'=-\dfrac{y}{x} $$ We have \begin{eqnarray} \dfrac{y'}{y}&=&-\dfrac1x\\ \int\dfrac{dy}{y}&=&-\int\dfrac{dx}{x}\\ \ln|y|&=&\ln|C|-\ln|x|\\ y&=&\dfrac{A}{x}. \end{eqnarray} Now, we use the variation of constants: $$ y'=\dfrac{A'}{x}-\dfrac{A}{x^2}=e^{-x}-\dfrac{A}{x^2}, $$ therefore $$ A'=xe^{-x}, $$ and using integration by parts we get $$ A=\int xe^{-x}\,dx=-xe^{-x}+\int e^{-x}\,dx=-xe^{-x}-e^{-x}+B=-(x+1)e^{-x}+B $$ We deduce that $$ y=-\left(1+\dfrac{1}{x}\right)e^{-x}+\dfrac{B}{x}. $$ using the initial condition $y(1)=2$, we deduce that $$ B=2+2e^{-1}, $$ thus $$ y=-\left(1+\dfrac{1}{x}\right)e^{-x}+\dfrac{2+2e^{-1}}{x}. $$

0

Start by writing: $$\frac{dy}{dx}+\frac{y}{x}=e^{-x} \tag{1}$$ This is a first order linear ODE. Hence, we can either use an integrating factor or use Variation of parameters (see "First order equation").

If you want to use an integrating factor, it will be:

$$\mu(x)=e^{\int \frac{1}{x}~dx}=x$$

Multiply equation $(1)$ by $\mu(x)$:

$$x\frac{dy}{dx}+y=\frac{x}{e^x}$$

If you still cannot solve it, feel free to let us know.