# Differential Equations Proof

Show that every solution curve for the equation $y'=x-y$ approaches the line $y=x-1$ as $x\to +\infty$.

Before showing what is asked for above I would like to show the derivation of a formula that will come in handy for solving this problem. The derived formula is used for finding the solution to a linear first-order equation.

I begin by writing down a linear first-order equation in the form $\frac{dy}{dx} + P(x)y=Q(x)$ on an interval on which the coefficient functions$P(x)$ and $Q(x)$ are continuous. I next multiply each side of the equation by the integrating factor $\rho(x)=e^{\int P(x) dx}$. An integrating factor for a differential equation is a function, $\rho(x,y)$ such that the multiplication of each side of the differential equation by $\rho(x,y)$ yields an equation in which each side is recognizable as a derivative. After the multiplication I obtain the equation $e^{\int P(x) dx}\frac{dy}{dx}+P(x)e^{\int P(x) dx}y=Q(x)e^{\int P(x) dx}$. Now, because $D_{x}[\int P(x) dx]=P(x)$, the left-hand side is the derivative product $y(x)e^{\int P(x) dx}$ so the equation becomes $D_{x}[y(x)e^{\int P(x) dx}]=Q(x)e^{\int P(x) dx }$. Integration of both sides of the equation gives me $y(x)e^{\int P(x) dx}=\int(Q(x)e^{\int P(x) dx})dx + C$. Finally, I can solve for $y(x)$ which will give me the general solution for linear first-order equations which will be useful for the initial proof. The general solution is $y(x)=e^{-\int P(x)dx}[\int (Q(x)e^{\int P(x) dx}) dx +C]$.

Now, for the proof I start by finding the integrating factor. After writing the given equation in the form $\frac{dy}{dx} + P(x)y=Q(x)$ I find that $P(x)$ is $1$ which implies that $\rho =e^{\int 1 dx}$ which equals $e^{x}$. Now, I can multiply each side of the equation by $\rho$ which gives me $e^{x}\frac{dy}{dx} +ye^{x}=xe^{x}$. Because of the product rule of derivates this equation is equivalent to $D_{x}[e^{x}y]=xe^{x}$. After integrating each side of the equation, I obtain $e^{x}y = \int xe^{x} dx$. For the right side of the equation, I am going to have to apply the Integration by Parts technique which is of the formula $uv - \int v du$. To use this formula, I must choose the right values for $u$ and $v$. I choose $u =x$, and $v = e^{x}$ which implies that $du = 1 dx$ and $dv = e^{x}$. Now, I can substitute the appropriate variables into the Integration by Parts formula to obtain the equation $e^{x}y = xe^{x} - \int e^{x} dx$. I now have a final integration to do on the right side of the equation and after doing so I obtain $e^{x}y = xe^{x} - e^{x} + C$. I can then solve for $y(x)$ to obtain $y = x - 1 + \frac{C}{e^{x}}$. Finally, I can take $\displaystyle \lim_{x \to + \infty}$, and in this limit the term $\frac{C}{e^{x}}$ goes to $0$ because the exponential gets larger and larger as $x$ gets larger and larger which causes the fraction to essentially approach $0$. This means that $y(x)$ approaches the line $x - 1$ which is what was asked to prove.