6
$\begingroup$

I had to integrate the following integral:

\begin{equation} \int\frac{\cos^2(x)-x^2\sin(x)}{(x+\cos(x))^2}dx \end{equation}

but I can't find a suitable substitution to find a solution. Nothing I try works out and only seems to make it more complicated. Does anyone have an idea as to how to solve this?

I also tried to get help from WolframAlpha but it just says that there is no step-by-step solution available.

The sollution by wolfram alpha is: \begin{equation} \int\frac{\cos^2(x)-x^2\sin(x)}{(x+\cos(x))^2}dx = \frac{x\cos(x)}{x+\cos(x)} + c \end{equation}

$\endgroup$
  • 2
    $\begingroup$ But what is the solution by WolframAlpha? $\endgroup$ – Dr. Sonnhard Graubner Jan 18 at 16:57
  • $\begingroup$ I've included the solution by WolframAlpha in the question. $\endgroup$ – Viktor Jan 18 at 17:00
3
$\begingroup$

\begin{equation} \int\frac{\cos^2 x-x^2\sin x }{(x+\cos x)^2}dx \end{equation}

Divide both numerator and denominator by $x^2\cos^2 x$

\begin{equation} \int\frac{\cos^2 x-x^2\sin x }{(x+\cos x)^2}dx =\int\frac{\dfrac{1}{x^2}-\dfrac{\sin x}{\cos^2 x}}{(\dfrac{1}{\cos x}+\dfrac{1}{x})^2}dx =\frac{1}{\dfrac{1}{\cos x}+\dfrac{1}{x}} + C =\frac{x\cos x}{x + \cos x} + C \end{equation}

$\endgroup$
4
$\begingroup$

When you see an integral like that, although you quickly find $u=x+\cos x$ won't work, you can't help but think there'll be a nice antiderivative of the form $\frac{f}{x+\cos x}$. So now, we want to solve $$\cos^2x-x^2\sin x=(x+\cos x)f^\prime-(1-\sin x)f.$$Can we write the left-hand side as a linear combination of $x+\cos x,\,1-\sin x$? After a little experimenting, yes: it's $$x\cos x-x^2\sin x+\cos^2x-x\cos x\sin x-x\cos x+x\cos x\sin x\\=(x+\cos x)(\cos x-x\sin x)-x\cos x(1-\sin x),$$implying the choice $f=x\cos x,\,f^\prime=\cos x-x\sin x$, which happily are consistent.

$\endgroup$
  • $\begingroup$ What you are indeed doing is applying the quotient rule in reverse. Namely $$\left (\frac{u}{v} \right )' = \frac{u' v - v' u}{v^2}$$ and is a nice little trick provided the conjuring up of the function $u(x)$ is not too difficult. $\endgroup$ – omegadot Jan 19 at 1:23
  • $\begingroup$ @omegadot This time I was, yes. The broader point was that integrands often give an easy hint about some ingredient of their antiderivative, in this case of a denominator. $\endgroup$ – J.G. Jan 19 at 7:37
3
$\begingroup$

Note that the derivative of $x + \cos(x)$ in the denominator is $1-\sin(x)$ . We can try to make this term appear in the numerator and then integrate by parts. We have $$ \frac{\cos^2(x)-x^2\sin(x)}{(x+\cos(x))^2} = \frac{\cos^2(x) - x^2 + x^2(1-\sin(x))}{(x+\cos(x))^2} = \frac{\cos(x) - x}{x+\cos(x)} + x^2 \frac{1-\sin(x)}{(x+\cos(x))^2} \, ,$$ so \begin{align} \int \frac{\cos^2(x)-x^2\sin(x)}{(x+\cos(x))^2} \, \mathrm{d}x &= \int \frac{\cos(x) - x}{x+\cos(x)} \, \mathrm{d} x - \frac{x^2}{x+\cos(x)} + \int \, \frac{2 x}{x+\cos(x)}\mathrm{d} x \\ &= x - \frac{x^2}{x+\cos(x)} = \frac{x \cos(x)}{x+\cos(x)} \end{align} as desired.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.