# Integration by parts: $\int \tan^2(4x)\sec(4x)\,dx$

I followed what I was taught and ended up somewhere not nice. Where did I go wrong?

$$\int \tan^2(4x)\sec(4x)\,dx = I$$

\begin{align} u &= \tan(4x) & dv &= \tan(4x)\sec(4x)\,dx \\ du &= 4\sec^2(4x)\,dx & v &= \frac{\sec(4x)}{4} \end{align}

$$\frac{\tan(4x)\sec(4x)}{4} - \int \sec^3(4x)\,dx$$

(Here's the rest of it:) We've also only been doing trig sub and integration by parts so that's the only 'methods' we're allowed to use. We did a question like this in class and we ended with a "$\cdots - I$" on the right side so when we cancel it out, it would become $2I$ on the left side. But in this case if we cancel out the $I$ on the left, it would cancel the $I$ on the right and it would just fail.

I can't seem to figure out where I went wrong.

• I blame the parents. – Will Jagy May 23 '17 at 2:40
• The close vote on this question is in error and should be retracted. This is most definitely about mathematics. Get over yourself. – Cameron Williams May 23 '17 at 2:44
• So, you have learned that if you blindly apply correct rules you can arrive at a correct but not useful conclusion ( such as $0=0$ in your case). That is only a failure if you ignore what you have learned. – MPW May 23 '17 at 2:45
• We usually ask people to type their equations in MathJax format (math.stackexchange.com/help/notation) instead of attaching pictures. In this case the formatting is complicated enough that I thought you could use a little help getting started; I formatted the first few lines of equations. You can use the "edit" button at the bottom of the question to see how I did it and to finish it (or to fix what I did if it wasn't what you wanted). – David K May 23 '17 at 3:03
• Whatever you have done, for Heaven's sake, you should first sub away $4x=t$ so that you don't have to deal with that freakin Chain rule all the time – imranfat May 23 '17 at 3:25

You basically undid your integration by parts if you closely inspect your two IBPs. This is a very real danger with integrating by parts when it is not immediately resolved.

Let's continue from your third line. Let us let $\sec^2(4x) = 1+\tan^2(4x)$, then we get

$$I = \frac{\tan(4x)\sec(4x)}{4} - \int \sec(4x)(1+\tan^2(4x))\,dx$$

which then becomes

\begin{align} I &= \frac{\tan(4x)\sec(4x)}{4} - \int \sec(4x)\,dx - \int \tan^2(4x)\sec(4x)\,dx \\ &= \frac{\tan(4x)\sec(4x)}{4} - \int \sec(4x)\,dx - I. \end{align}

Can you take it from here?

• Thank you so much! I didn't realize I undid it by doing it a second time, I've actually never encountered that so I didn't know it was even possible haha. Also I've never integrated sec(x) so that was interesting. In some places I read that they refer to this as a "common integral" and just did it right away. Again, thank you so much! – WildWombat May 23 '17 at 2:57
• Happy to help! Please feel free to ask future questions. – Cameron Williams May 23 '17 at 3:30