Calculus: Linear Differential Equation Hey guys I have this math problem. Here is my work and my final answer. I'd just like to know if it is correct. Thanks!
$$\frac{dy}{dx}+2x=y; y(0)=7$$
$$y'+2x=y$$
$$y'-y=-2x$$
$$p(x)=-1 \rightarrow e^{\int{p(x)dx}} = e^{-\int{dx}} = e^{-x}$$
$$\int{e^{-x}(y'-y)dx}=\int-2x(e^{-x})dx$$
$$e^{-x}y=2xe^{-x}+2e^{-x}+C$$
$$y=2(x+1)+\frac{C}{e^{-x}}$$
$$7=2+C$$
$$C=5$$
$$y=2(x+1)+\frac{5}{e^{-x}}$$

You can always, when doing diff eq's, check you answer by differentiating tto get $y'$ and plugging back into the equation.  The check is much easier than finding the solution.
Your answer is right, though I would write $\frac{5}{e^{-x}}$ as $5e^x$.
