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?

1 Answer
May 27, 2018

The presence of CC should not make a difference!

Explanation:

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

dy/dx + y = x^2dydx+y=x2

By using standard methods you can arrive at the solution

y(x) = 2-2x+x^2+color(red)Ce^-xy(x)=22x+x2+Cex

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

dy/dx = d/dx(2-2x+x^2+color(red)Ce^-x)dydx=ddx(22x+x2+Cex)
qquad = -2+2x-color(red)Ce^-x

Both the solution and its derivative contain a term which has the arbitrary constant of integration color(red)C. When you substitute these on the left hand side of the equation, you get

"LHS" = dy/dx+x
qquad = [-2+2x-color(red)Ce^-x]+[ 2-2x+x^2+color(red)Ce^-x]

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 color(red)C cancel out!