How do I handle equations like $f(x)-x = f'(x)$? How do I handle equations like $f(x)-x = f'(x)$?
Integrating both sides gets me nowhere... I have been trying to guess an example, but with no avail. I cannot think of any other approaches ...
Edit: ok i noticed $f(x) =x+1$ ... can someone guide be to how i can solve for the other solutions?
 A: There are standard methods to solve ODEs of the form $f'(x) + p(x)f(x) + q(x)=0$ by multiplying the so-called integrating factor $e^{\int p(x)dx}$ on both sides. In this particular case, it's quite simple: $$e^{-x}f'(x)-e^{-x}f(x) = -xe^{-x}$$
By product rule $$(e^{-x}f(x))' = -xe^{-x}$$ hence $$e^{-x}f(x) = \int (-xe^{-x})dx$$ $$f(x) = e^x \int (-xe^{-x})dx$$ and it's simple to compute the integral.
A: This can be solved by inspection.  $x+1$ is a solution, and any other solution must differ from this by a solution to $F'(x)=F(x)$
Proof:  If $f,g$ are two solutions to the original equation then subtract $g(x)-x=g'(x)$ from $f(x)-x=f'(x)$ to see that $(f-g)(x)=(f-g)'(x)$.
As the solutions to $F'(x)=F(x)$ are well known to be $ce^x$ for some constant $c$, the general solution to your equation is $f(x)=x+1+ce^x$.
A: The given differential equation is a linear differential equation of the form
$$
y' + P(x) y = Q(x)  \tag{1}
$$
where $P(x) = -1$ and $Q(x) = -x$.
The integrating factor for the linear ODE (1) is given by
$$
M(x) = e^{\int P(x) dx} = e^{\int (-1) dx} = e^{-x}
$$
The general solution of the linear ODE (1) is given by
$$
y = {1 \over M(x)} \ \left[ \int M(x) Q(x) dx + c \right] \tag{2}
$$
where $c$ is an arbitrary constant.
Substituting and simplifying, we get
$$
y = {1 \over e^{-x}} \ \left[ \int e^{-x} (-x) dx + c \right]
= e^x \ \left[ \int x d\left( e^{-x} \right) + c \right]
$$
Using integration by parts, we get
$$
y = e^x \left[ x e^{-x} + e^{-x} + c \right] = x + 1 + c e^x
$$
A: Letting y= f(x), we can write the equation as y- x= y' or y'- y= -x.  That is a linear first order equation with constant coefficients.  The simplest way to solve a linear equation of any order is to first solve the "homogeneous" part.  Here that is y'- y= 0 which has characteristic equation r- 1= 0 so r= 1 and the general solution to the differental equation is $y= Ce^x$.
Now we need to add a specific solution to the entire equation.  Since the "non-homogeneous" part is -x, we look for a solution of the form y= Ax+ B.  Then y'= A and the equation becomes A- Ax- B= -Ax+ (A- B)= -x.  For this to be true for all x, we must have -Ax= -x, so A= 1, and A- B= 1- B= 0 so B= 1.  A specific solution to the entire equation is y= x+ 1.
So the general solution to the entire equation is $f(x)= y= Ce^x+ x+ 1$.
Check: If $f(x)= Ce^x+ x+ 1$ then $f'(x)= Ce^x+ 1$ $f(x)- x=Ce^x+ x+ 1- x= Ce^x+ 1= f'(x)$.
A: I know that the below solution doesn't work in many situations, but I like to share its idea.
Suppose $f(x) = \sum_{n \geq 0}a_nx^n$ is the power series of $f$. Because $f(x) - x = f'(x)$, term by term differentiating of the power series gives us
\begin{align*}
\sum_{n \geq 0}a_nx^n - x = \sum_{n \geq 1}na_nx^{n-1} \implies a_0 + (a_1 - 1)x + a_2x^2 + \cdots = a_1 + 2a_2x + 3a_3x^2 + \cdots
\end{align*}
Because the above equation is correct for all $x$, so we have:
\begin{align*}
a_1 &= a_0\\
a_1 - 1 = 2a_2 \implies a_2 &= \frac{a_1 - 1}{2} = \frac{a_0 - 1}{2}\\
a_2 = 3a_3 \implies a_3 &= \frac{a_2}{3} = \frac{a_0 - 1}{3!}
\end{align*}
Computing in this way shows that for all $n \geq 2$ we have $a_n = \frac{a_0 - 1}{n!}$. Therefore
\begin{align*}
f(x) = \sum_{n \geq 0}a_nx^n &= a_0 + a_1x + a_2x^2 + a_3x^3 + \cdots\\
&= a_0 + a_0x + (a_0 - 1)\frac{x^2}{2!} + (a_0 - 1)\frac{x^3}{3!} + \cdots\\
&= 1 + x + (a_0 - 1) + (a_0 - 1)x + (a_0 - 1)\frac{x^2}{2!} + (a_0 - 1)\frac{x^3}{3!} + \cdots\\
&= 1 + x + \underbrace{(a_0 - 1)}_Ce^x
\end{align*}
For an arbitrary constant $C \in \mathbb{R}$.
