0
$\begingroup$

I'm going through some Calculus homework with using integration by parts and I'm getting hit with this sucker:

$$\int\sec^2(x)\ln(\tan(x)+2)dx$$

I'm not sure how to go about tackling this monster. Things I've tried:

1)Letting $u$ equal the entire function, and $dv$ equal $dx$; problem I ran into here is I then feel uncomfortable obtaining the derivative of $u$

2) Trying to do u-sub first before doing parts, but again with the uncomfortability/doubting my steps

That's honestly about it (wish I could give more feedback), first thing I did try though was to let $u$ equal everything inside $sec^2$ but realized that was illegal. So, any suggestions to kick start me on the set up of this beast? I don't necessarily need it solved (though feel free to), but I'm mainly looking at the set up, I just don't know where to begin.

  • 1
    Hint: substitute $u=\tan{x}$ with $du = \sec^2{x}\ dx$ to get rid of the $\sec^2{x}$ factor.2017-02-06
  • 1
    Is this supposed to be $$\int \sec^2(\log[\tan(x)+2])dx$$ or $$\int \sec^2(x)\log[\tan(x)+2]dx$$ just want to clarify you have your MathJax correct. The latter is going to be pretty easy to integrate with IBP. The former is a lot uglier2017-02-06
  • 0
    @BrevanEllefsen It is actually written the second way you wrote it. Excuse my ignorance, but what is the difference? Does excluding the parens assume that it's $sec^2x$?2017-02-06
  • 0
    @DovahkiinvasNormandy The parentheses are supposed to go around whatever you put into the function. Since you have them around the logarithm, the way you wrote it we put the logarithm *into* the $sec^2$. Notice the difference between $\sec^2(x)\log(x)$ and $\sec^2(\log(x))$2017-02-06
  • 0
    @BrevanEllefsen Seeing your edit, it is not written that way. The logarithm is inside $\sec^2$. I wrote it exactly as it appears on my end.2017-02-06
  • 0
    @DovahkiinvasNormandy Ok, I will revert the edit then2017-02-06
  • 0
    @DovahkiinvasNormandy I have edited it back. I am not sure there is a closed form when the logarithm is inside of the secant, only when the two are separate and multiplied though2017-02-06
  • 0
    Given the edit, it seems that what is being asked is how to integrate $$\int \sec^2\Big(\ln(\tan (x) + 2)\Big)\,dx$$ So we have $f(x) = \tan(x) +2$, $g(x) = \ln(x)$, and $h(x) = \sec^2 x$, and we are evaluating $$\int h(g(f(x)))\,dx$$2017-02-06
  • 1
    @DovahkiinvasNormandy three open brackets & two close brackets ? Edit the title ?2017-02-06

2 Answers 2

3

Make a substitution first \begin{eqnarray*} \int \sec^2(x) \ln( \tan(x)+2) dx = ? \end{eqnarray*} Let $u= \tan(x)+2$ so $du= \sec^2(x) dx$ & the integral becomes \begin{eqnarray*} \int \ln( u) du \end{eqnarray*} Now use integration by parts ... integrate 1 & differentiate $ \ln $ \begin{eqnarray*} \int \ln( u) du = u \ln u -u +c \end{eqnarray*} Now substitute back & we have \begin{eqnarray*} \int \sec^2(x) \ln( \tan(x)+2) dx =( \tan(x)+2) \ln( \tan(x)+2)-( \tan(x)+2)+c \end{eqnarray*}

  • 0
    Good answer. Avoids the partial fraction decomposition and is generally a bit easier. +1 from me for sure!2017-02-06
  • 0
    @BrevanEllefsen Thank you Brevan ... Will we need to convince Dovahkiin of the classic result about the integral of $ \ln$ ?2017-02-06
  • 0
    I would say that it's not well enough known that explaining how to prove it with integration by parts is a good idea.2017-02-06
2

My guess is that the logarithm is not inside the secant. I don't think the function can be integrated in any simple closed form if that's the case; as such, I am going to assume your worksheet meant
$$\int \sec^2(x)\log(\tan(x)+2)dx$$ We know the integral of $\sec^2(x)$ and we know the derivative of $\log(x)$, so let's use those. Let $v' = \sec^2(x) \implies v = \tan(x)$ and let $u = \log(\tan(x)+2) \implies u' = \frac{\sec^2(x)}{\tan(x)+2}$
This makes our integral $$=\log(\tan(x)+1)\tan(x)-\int \frac{\tan(x)\sec^2(x)}{\tan(x)+2}$$ Now we let $u=\tan(x)$ and $du=\sec^2(x)dx$ $$=\log(\tan(x)+1)\tan(x)-\int \frac{u}{u+2}du$$ Now we do partial fraction decomposition, noting that $\frac{u}{u+2} = 1-\frac{2}{u+2}$ to get two integrals we can manage. Back substitute for $u$ and you are done

  • 0
    I'm awaiting confirmation if that is the correct form. However this does seem much more manageable, and makes a ton of sense now that I see the setup. Thanks for being patient and helping out mate. If it happens to be the other way, it sounds like it gets much more hairy...2017-02-06
  • 0
    Just to extra clarify. This indeed was the correct format.2017-02-06
  • 0
    Why did we go from 2 to 1 though? shouldn't it be $sec^2(x)/tan(x)+2$?2017-02-06
  • 1
    @DovahkiinvasNormandy Yep, good catch XD Thanks for checking my work. I'll fix that real quick2017-02-06
  • 0
    @DovahkiinvasNormandy I think that should fix it. Let me know if you catch any more errors. I wrote the post in a bit of a rush so there might be some!2017-02-06