# Teacher needs help with an integral involving trig identities that a student found online

$$\int\frac{\sqrt{\sec^3(x)+\tan^3(x)+\tan(x)}}{1+\sec(x)-\tan(x)}\,dx\quad\text{for 0

I have spent several days trying and failing to solve this problem. I am a teacher student of mine found it online. They asked for help solving it and initially I thought that there was a sign error because if so, I could easily solve it by substitution. However, the student maintains that it can be solved. I have tried so many things, I even resorted to using an online integral calculator which said there was no antiderivative. I am just so drained and demoralized, any help with this is appreciated.

• Please do not use pictures for critical portions of your post. Pictures may not be legible, cannot be searched and are not view-able to some, such as those who use screen readers. Commented May 11, 2023 at 6:36
• I have spent several days trying and failing to solve this problem. $[\cdots]$ I am just so drained and demoralized -- What motivated you to spend so much time and effort on a student question? That you would do this seems VERY strange to me. I can understand telling the student that you'll think about it and get back to them the next class. However, if an answer isn't easily forthcoming, aren't you too busy grading tests/quizzes/homework and preparing lectures and other duties to spend much time on questions outside the scope of your syllabus? Commented May 11, 2023 at 7:58
• I thought that there was a sign error because if so, I could easily solve it by substitution. However, the student maintains that it can be solved -- It seems to me that a more reasonable conclusion is that the original source (oddly not cited in your question) and/or the student is in error. Commented May 11, 2023 at 8:03
• @DaveL.Renfro Are stating the question is wrong because I think the solution I mentioned may be a way to solve the problem. Commented May 11, 2023 at 8:21
• OK, what you've now said seems more believable for a teacher to say. Very often in this question/answer group, homework questions are asked by students, but the students make up a different background context (e.g. "I was talking to my sister today and she asked me ...") in such a way that their background context seems very suspicious. (Homework questions are OK here, but students should be honest in their background context.) The way you worded your background context sounded very suspicious. That said, this problem is a bit beyond what students will need for the calculus AP test (AB or BC). Commented May 12, 2023 at 6:57

Let $$I = \int \frac{\sqrt{\sec^3x+\tan^3x+\tan x}}{1+\sec x-\tan x}dx$$

Write the $$1$$ in the denominator as $$\sec^2x-\tan^2x$$, and substitute $$t = \sec x+\tan x$$ Or, $$dx=\frac{2dt}{t^2+1}$$

and we can write $$\sec x = \frac{t^2+1}{2t}$$ and $$\tan x=\frac{t^2-1}{2t}$$.

Substituting these in the integral, the integral now transform to

$$I= \int{\frac{t\sqrt{t \left(\frac{1}{t^2}+\frac{t^2+1}{2t}\frac{t^2-1}{2t} \right)+\frac{t^2-1}{2t}}}{t+1}}\frac{2dt}{t^2+1}$$

After some simplification, it simplifies to $$I=\int \frac{\sqrt t}{t+1}dt$$ which can be solved by taking $$u=\sqrt{t}$$, and the integral evaluates to $$I=2(\sqrt t-\arctan(\sqrt t))$$ and as, $$t=\sec x+\tan x$$, $$\boxed{I=2(\sqrt{\sec x+\tan x}-\arctan{\sqrt{\sec x+ \tan x})}+C}$$

• Thanks for your help Commented May 11, 2023 at 21:58

I presume when you refer to sign error, you are refering to portion of $$\sec(x)-\tan(x)$$ in the denominator. If that's the case then just replace $$\sec(x)-\tan(x)$$ by $$\dfrac{1}{\sec(x)+\tan(x)}$$ and I believe you can solve the rest.

Edit: Just thought of including the full solution. $$\int \dfrac{\sqrt{\sec^3x + \tan^3x +\tan x}}{1+\sec x - \tan x}dx$$

$$= \int \dfrac{\sqrt{\sec^3x + \tan^3x +\tan x}}{1+\dfrac{1}{\sec x + \tan x}}dx$$ $$= \int \dfrac{(\sec x+ \tan x)\sqrt{\sec^3x + (\tan^2x +1)\tan x}}{1+\sec x + \tan x}dx$$ $$= \int \dfrac{\sec x(\sec x+ \tan x)\sqrt{\sec x +\tan x}}{1+\sec x + \tan x}dx$$

Now let, $$u=\sec x + \tan x + 1$$ $$\implies du = \sec x(\sec x + \tan x)dx$$ Hence our integral transforms into, $$\int \dfrac{\sqrt{u-1}}{u}du$$ Now again, substitute $$u-1=z^2$$ $$\implies du = 2z dz$$ Finally we have, $$\int \dfrac{2z^2}{z^2+1}dz$$

Note: This step could have been easily achieved by taking $$u=\sec x + \tan x$$ at the very beginning, but I decided to break this step down for easier understanding.

I leave it from here as this integral is very elementary. At the end we need to re-substitute $$z$$ in terms of $$x$$ to have our final answer.

• Please precede the trig functions' names with a backslach. This makes them symbols for LaTeX/MathJax so they are rendered in an upright font with appropriate spacing as function names, not as an amorphous blob of italic (variable-like) letters. See, for example, the results of using sec x → $sec x$ versus \sec x → $\sec x$. Commented May 11, 2023 at 9:51
• Yep just done that. Commented May 11, 2023 at 10:46
• Thanks for your help Commented May 11, 2023 at 21:52

The use of the $$\sec$$ is a bit confusing. The integral can be done with the standard substitution $$u = \tan \frac{x}{2}$$, but the result is terrible in terms of roots containing $$2 + \sqrt 7$$ and some others. The expression is to big to handle.

The given answer is more compact, but its hard to prove

D[2 (Sqrt[Sec[x] + Tan[x]] - ArcTan[Sqrt[Sec[x] + Tan[x]]]), x] // FullSimplify

(Sec[x] (Sec[x]+Tan[x])^(3/2))/(1+Sec[x]+Tan[x])


Change of sign in denominator and power $$\dfrac12$$ to $$\dfrac32$$

    Assuming[0<x<Pi/2,FullSimplify[ Sqrt[Sec[x]^3 + Tan[x]^3 + Tan[x]]/(1+ Sec[x]-Tan[x]) -
( Sec[x] (Sec[x] + Tan[x])^(3/2))/(1 + Sec[x] + Tan[x]), {x, 0, 7}])


No result, but Series or plot do

     Series[ Sqrt[Sec[x]^3 + Tan[x]^3 + Tan[x]]/
(1 + Sec[x] - Tan[x]) ==
(  Sec[x] (Sec[x] + Tan[x])^(3/2))/
(1 + Sec[x] + Tan[x]), {x, 0, 32}]

True

• I never would of thought of using a half angle substitution. Thanks for your help. Commented May 11, 2023 at 21:48