# Confused by integrating factors example.

I'm struggling to understand how this step works when solving a differential equation by integrating factors.

The question is, solve: $$x\frac{dy}{dx} - 3y = x^4 \cos(x),$$for $x > 0$.

I don't understand how to get from step (a) to step (b).

$$(a): \frac{1}{x^3}y' - \frac{3}{x^4}y = \cos(x),\\ (b): \frac{d}{dx}\frac{1}{x^3}y = \cos(x).$$

In the notes it mentions that the 2nd term is a derivative of the first term but it doesn't really help me understand what's going on.

Thanks.

• All integrating factor questions are the same. A simpler example might be to see that $y' + xy = \frac{d}{dx}(xy)$ – Kaynex Dec 28 '16 at 22:47

We have a differential equation $$a(x)y'+b(x)y=c(x)$$ Divide through by $a(x)$ to obtain $$y'+p(x)y=q(x)$$ Now imagine that we have a convenient term $k(x)$ such that $$k(x)y'+p(x)k(x)y=(k(x)y)'=k'(x)y+y'k(x)$$ This yields a differential equation for $k(x)$, i.e. $$k'(x)=k(x)p(x)$$ A separable equation with solution $k(x)=Ce^{\int p(x)}$. Now, because of the way that we have constructed $k(x)$, when we multiply $y'+p(x)y=q(x)$ through by $k(x)$, we obtain $$k(x)y'+k(x)p(x)y=(yk(x))'=q(x)$$ Which can be solved for $y$ by integrating both sides and dividing by $k(x)$. In your specific case $p(x)=-\frac 3x$ and $q(x)=x^3\cos x$.

• Well, explained, but I think $p(x)$ is missing a minus sign. – Mike Dec 29 '16 at 0:29
• @Mike good catch, had not noticed. – Guacho Perez Dec 29 '16 at 1:10

Use the product rule on $\frac{1}{x^3}y$ and you'll get exactly the terms from part (a).

You can just check that by performing the differentiation in $(b)$ (the notation is kind of misleading): $$\frac{\mathrm{d}}{\mathrm{d} x} \left( \frac{1}{x^3} y(x) \right) = \frac{-3}{x^4} y(x) + \frac{1}{x^3} y'(x).$$