Taking the root of sec^2 in an integral

Homework Statement

$\displaystyle \int \sin x \sqrt{1+ \tan ^2 x} dx$

The Attempt at a Solution

So clearly we have that $\displaystyle \int \sin x \sqrt{\sec ^2 x} dx$, but I am not sure how to proceed. Isn't it true that $\sqrt{\sec ^2 x} = | \sec x|$? How would I integrate $\sin x | \sec x |$?

Related Calculus and Beyond Homework Help News on Phys.org
mathwonk
Homework Helper
i would ignore the absolute value and then try sin.sec = sin/cos = tan. oh wait, it is better to do sin/cos as maybe -log(cos)? then differentiate back and see how close you came.

then just match up the signs according to what interval you are working on. i.e. your original integrand is positive precisely when sin is positive, so tan works for example on intervals where both sin and cos are positive.

Last edited:
i would ignore the absolute value and then try sin.sec = sin/cos = tan. oh wait, it is better to do sin/cos as maybe -log(cos)? then differentiate back and see how close you came.

then just match up the signs according to what interval you are working on. i.e. your original integrand is positive precisely when sin is positive, so tan works for example on intervals where both sin and cos are positive.
Why am I allowed to just ignore the absolute value?

Ray Vickson
Homework Helper
Dearly Missed
Why am I allowed to just ignore the absolute value?
You will get two possible answers, each valid within different regions. If you take $\sqrt{\sec^2 x} = \sec x$ your integrand is $\tan x$, and is valid in any region where $\cos x > 0.$. If you take $\sqrt{\sec^2 x} = -\sec x$ your integrand is $-\tan x$, and is valid wherever $\cos x < 0.$

If you were doing a definite integral of the form
$$\int_a^b \sin x \sqrt{\sec^2 x} \, dx,$$
you would need to be extra careful about which of these cases to use. If the integration limits $a$ and $b$ happened to be in different regions (that is, in regions where $\cos x$ changes sign) you would need to worry even more about whether the integral even exists at all, since you would be integrating through a point where the integrand is singular. In such a case an ordinary integral might not exist, but a "principal value" integral might---I am not sure.

Note added in edit: I am now sure a principal-value integral does not exist.

Last edited:
You will get two possible answers, each valid within different regions. If you take $\sqrt{\sec^2 x} = \sec x$ your integrand is $\tan x$, and is valid in any region where $\cos x > 0.$. If you take $\sqrt{\sec^2 x} = -\sec x$ your integrand is $-\tan x$, and is valid wherever $\cos x < 0.$

If you were doing a definite integral of the form
$$\int_a^b \sin x \sqrt{\sec^2 x} \, dx,$$
you would need to be extra careful about which of these cases to use. If the integration limits $a$ and $b$ happened to be in different regions (that is, in regions where $\cos x$ changes sign) you would need to worry even more about whether the integral even exists at all, since you would be integrating through a point where the integrand is singular. In such a case an ordinary integral might not exist, but a "principal value" integral might---I am not sure.

Note added in edit: I am now sure a principal-value integral does not exist.
By your example I see clearly how this would work in the case of a definite integral, but I don't see which sign of sec to choose in this case where we are working with an indefinite integral.

Ray Vickson
You can't: either sign can be true sometimes and false sometimes. All you can do is write "cases" that depend on the sign of $\cos x.$ That will give you a piecewise-defined function that is always "true".