# How to check work for First Order Linear Differential Equation?

## So for example, I calculated what y is from the equation. According to our book, I should take the derivative of that answer to check work. But how in the world do you take a derivative with a +C in there. The C will stay there afterwards, so there is almost no way to check it? Or did I misunderstand something?

May 27, 2018

The presence of $C$ should not make a difference!

#### Explanation:

Let me explain with an example. Consider the linear first order ODE

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

By using standard methods you can arrive at the solution

$y \left(x\right) = 2 - 2 x + {x}^{2} + \textcolor{red}{C} {e}^{-} x$

Let us see how you can check this solution by taking the derivative. The derivative is easily seen to be

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(2 - 2 x + {x}^{2} + \textcolor{red}{C} {e}^{-} x\right)$
$q \quad = - 2 + 2 x - \textcolor{red}{C} {e}^{-} x$

Both the solution and its derivative contain a term which has the arbitrary constant of integration $\textcolor{red}{C}$. When you substitute these on the left hand side of the equation, you get

$\text{LHS} = \frac{\mathrm{dy}}{\mathrm{dx}} + x$
$q \quad = \left[- 2 + 2 x - \textcolor{red}{C} {e}^{-} x\right] + \left[2 - 2 x + {x}^{2} + \textcolor{red}{C} {e}^{-} x\right]$

As you can easily see, the right hand side evaluates to ${x}^{2}$ - which shows that the solution we have arrived at is the correct one. The terms containing the arbitrary constant $\textcolor{red}{C}$ cancel out!