# Thread: Another general solution problem

1. ## Another general solution problem

y`-y=x^2 +1

y=ax^2+bx+c ( as it x^2 +1 is a quadratic) I also found that y´= 2ax+b

I then plugged it into the original equation ( y´-y= x^2 +1)

and got

(2ax+b)-(ax^2 +bx+c)= x^2+1

I am suppose to find a,b,c ( constants) but I dont really know how to start as they are 3 different constants. I wasnt able to come up with 3 different equations.

2. $\displaystyle \displaystyle \frac{dy}{dx} - y = x^2 + 1$.

This is first order linear, so use the integrating factor method. The integrating factor is $\displaystyle \displaystyle e^{\int{-1\,dx}} = e^{-x}$.

Multiplying both sides of the DE by the integrating factor gives

$\displaystyle \displaystyle e^{-x}\frac{dy}{dx} - e^{-x}y = e^{-x}(x^2 + 1)$

$\displaystyle \displaystyle \frac{d}{dx}(e^{-x}y) = e^{-x}(x^2 + 1)$

$\displaystyle \displaystyle e^{-x}y = \int{e^{-x}(x^2 + 1)\,dx}$

$\displaystyle \displaystyle e^{-x}y = -e^{-x}(x^2 + 1) - \int{-2x\,e^{-x}\,dx}$

$\displaystyle \displaystyle e^{-x}y = -e^{-x}(x^2 + 1) + 2\int{x\,e^{-x}\,dx}$

$\displaystyle \displaystyle e^{-x}y = -e^{-x}(x^2 + 1) + 2\left(-x\,e^{-x} - \int{-e^{-x}\,dx}\right)$

$\displaystyle \displaystyle e^{-x}y = -e^{-x}(x^2 + 1) - 2x\,e^{-x} + 2\int{e^{-x}\,dx}$

$\displaystyle \displaystyle e^{-x}y = -e^{-x}(x^2 + 1) - 2x\,e^{-x} - 2e^{-x} + C$

$\displaystyle \displaystyle y = -x^2 - 1 - 2x - 2 + Ce^{-x}$

$\displaystyle \displaystyle y = Ce^{-x} - x^2 - 2x - 3$.

3. Why did you integrate both sides and Where are the constants, shouldnt you plug what y is (ax^2+bx+c) and solve for them. Could you explain

4. Originally Posted by aa751
Why did you integrate both sides and Where are the constants, shouldnt you plug what y is (ax^2+bx+c) and solve for them. Could you explain
You don't know that $\displaystyle \displaystyle y$ is a quadratic. In fact, you should realise that the function is $\displaystyle \displaystyle ax^2 + bx + c + 0$, the zero part means you need to find a function that creates $\displaystyle \displaystyle 0$ when it is subtracted from its derivative, in other words, an exponential part.

I suggest you research the Integrating Factor method.

5. Its just that when the teacher explained in class he did it differently but thank you alot for your help and I will research