# Integration of a function

1. Apr 5, 2010

### CrimeBeats

Hello,
Recently, a friend challenged me to solve the integration of this function:
f(x) = tan^4(x)/cos^3(x)
After about a page of work, i found that i must integrate this:
x^4 / sqrt(x^2 -1)

Simply, the question is:
How can i integrate x^4/sqrt(x^2-1)?

2. Apr 5, 2010

### D H

Staff Emeritus
A friend or a teacher asked you to solve this? This looks a bit too much like homework.

So, some hints:
1. Reduce f(x) to a polynomial in sec(x).
2. There is a handy formula for reducing $\int \sec^m x dx$ to a (somewhat) simpler form that reduces the power m in the integral to m-2. Find it, or derive it.
3. Eventually you will need to find $\int \sec x dx$.

3. Apr 5, 2010

### CrimeBeats

do you mean by reduction formula like:
S(f(x)*g(x))dx = fx*Sg(x) - S(Sg(x)*f'(x))dx?
note: S = the... integration sign
sorry for writing this way :)

4. Apr 5, 2010

### D H

Staff Emeritus
No. Here is an example of a reduction formula:

$$\int \cos^m x\,dx = \frac 1 m\cos^{m-1}x\sin x \;+\;\frac{m-1}m\int\cos^{m-2}x\,dx$$

Notice how the above reduces the power of cos(x) by two from the integral on the left-hand side to the integral on the right-hand side. This expands recursively. Also note that the above pertains to cos(x), not sec(x). The above is not the integral you want to use. The above integral is illustrative but is not directly applicable to this problem.

Before I help you any further, is this homework? Be honest, now.

5. Apr 5, 2010

### CrimeBeats

its not really a homework.. a friend of mine got challenged by this question by another friend by his tutor (as he said) so he came asking me how to solve it (as the class math guy).. anyway, in addition for further help, where can i find the... proof that the reduction formula is correct..
im just not one of the types who take laws and do them.. i want to know where did it come from (i'd be thankful if you can show me where did it come from)
thanks for helping, would appreciate further help :)

6. Apr 5, 2010

### Count Iblis

When one of the powers of sin or cos is odd, then integration is trivial. In this case you can write (with S = Sin(x), C = Cos(x)):

S^4/C^7 dx =

S^4 C/C^8 dx =

S^4/(1-S^2)^4 dS

Which can be easily solved using partial fractions.

7. Apr 5, 2010

### D H

Staff Emeritus
Regarding proving that the reduction formula given in post #4 is correct: just differentiate both sides with respect to x.

Deriving such formula is a bit trickier. That formula is obviously similar in form to integration by parts; in fact, you can derive the above by integration by parts. Just rewrite $\cos^mx$ as $\cos^{m-1}x\,\cos x$. That is a bit tedious, however.

Suppose you have a function f(x) of which you want to find the indefinite integral. Suppose also that you find, by cleverness or just good guessin', some function u(x) such that

$$\frac{du}{dx} = f(x) - g(x)[/itex] In other words, your guess is good, but not quite right. In terms of the desired integral, \int f(x)\,dx = u(x) + \int g(x)\,dx$$ Now suppose we want to integrate $\cos^n x$ wrt x. Let's guess the solution involves $u(x)=\sin x\cos^{n-1}x$ in some way. Differentiating wrt x, \aligned \frac{du}{dx} &= \cos x \cos^{n-1}x + (n-1)\sin x \cos^{n-2} x(-\sin x) \\ &= \cos^n x - (n-1) (1-\cos^2 x) \cos^{n-2} x\\ &= n \cos^n x - (n-1)\cos^{n-2} x \endaligned and thus $$\int \cos^n\,x dx = \frac 1 n \sin x\cos^{n-1}x + \frac{n-1}n\int \cos^{n-2}x\,dx$$ Once again, the above is *not* the reduction formula you want to use to help solve this problem. You want something that works with secant, not cosine. You want to find a way to reduce $$\int sec^n x\, dx$$ to something simpler. Before I give the answer away, try differentiating $\sin x \sec^{n-1} x$ with respect to x. 8. Apr 5, 2010 ### CrimeBeats @Count_Iblis: well how can integrate (1/(2(x-1))+1/(2(x+1)))^4? @D_H what do you exactly mean by "differentiate" ..? i know that sinx sec^n-1 x is tan(x) * sec^n-2(x) so the integration of tan(x) * sec^n-2 (x) is simply (sec^(n-1) (x))/(n-1) ... is that what i should find? 9. Apr 5, 2010 ### D H Staff Emeritus Differentiate means "compute the derivative of". 10. Apr 5, 2010 ### D H Staff Emeritus Just to be crystal clear, try computing $$\frac d{dx}(\sin x\cdot \sec^{n-1}x)$$ Try to express the result in terms of secant(x) only (i.e., there should be no other trig functions in the result). Addendum The reason finding a reduction formula for $\int \sec^n x\,dx$ will help is because $\tan^4x/\cos^3x = (tan^2 x)^2\sec^3 x = (\sec^2 x - 1)^2\sec^3 x$. Last edited: Apr 5, 2010 11. Apr 5, 2010 ### Count Iblis CrimeBeats, there are some very efficient ways to do partial fraction expansion. E.g., in this case, you can write: x^4/(x^2 - 1)^4 (x^2 - 1 + 1)^2/(x^2 - 1)^4 = 1/(x^2 - 1)^2 + 2/(x^2 - 1)^3 + 1/(x^2 -1)^4 This is not yet the complete partial fraction expansion but we are close. Let's hijack the partial fraction expansion of 1/(x^2 -1): 1/(x^2 - 1) = 1/2 [1/(x - 1) - 1/(x + 1)] Differentiate both sides w.r.t. x: -2x/(x^2 - 1)^2 = 1/2 [1/(x+1)^2 - 1/(x-1)^2] -----> 1/(x^2 - 1)^2 = 1/4 1/x [1/(x-1)^2 - 1/(x+1)^2] The 1/x factor here seems to spoil things. However, this problem can easily be fixed as follows. We have: 1/x 1/(x-1)^2 = 1/(x-1 + 1) 1/(x-1)^2 = 1/(x-1)^2 [1 - (x-1) + O(x-1)^2]. The singular part of the expansion around x = 1 is thus: 1/(x-1)^2 - 1/(x-1) The singular part of the expansion around x = -1 is found in the same way. You write the 1/x factor as: 1/x = 1/(x+1-1) = -1/[1 - (x+1)] and expand this in powers of x+1. The sum of the two singular parts is the partial fraction expansion,. This is because the difference of the rational function and the sum of the singular parts of the expasions doesn't have any singulularites anymore and thus must be a polynomial. In our case, the difference clearly tends to zero at infinity, which means that it has to be zero everywhere. Note that doing partial fraction expansions this way requires one to consider all singularities in the complex plane. 12. Apr 5, 2010 ### D H Staff Emeritus Back to the original post, How, exactly, did you arrive at this? I have a sinking suspicion you made a mistake in the page of math that led to this result. 13. Apr 5, 2010 ### Count Iblis I now see a one line solution to the integral, so simple that you can do it without paper and pencil. 14. Apr 5, 2010 ### D H Staff Emeritus I get a one-line solution in the end, but getting there is ugly. Did you use half-angle formulae or some such? 15. Apr 5, 2010 ### Count Iblis What I thought was a one line solution is actually a four line solution. You can do a partial integration where you integrate the factor tan^4(x) 1/cos^2(x). You then get an integral with integrand proportional to tan^5(x) 1/cos^2(x) sin(x) I forgot about that sin(x) factor when I thought that there was a one line solution. However, things are not so bad, as you can do a partial integration again. If you integrate the factor tan^5(x) 1/cos^2(x) you end up with an integral with integrand proportional to tan^6(x) cos(x) =sin^6(x)/cos^5(x) You then do partial integrations where you integrate sin(x)/cos^n(x), at each step the power of cos in the denominator gets reduced by 2 and the power of sin in the numerator gets reduced by 2. So after 2 steps you end up with the integral of sin^2(x)/cos(x) = -cos(x) + 1/[cos(x)]. So, after four simple partial integration steps in total we end up with the integral of 1/cos(x). My favorite way of evaluating that is to shift x so that it becomes 1/sin(t) and then we use double angle formula: 1/sin(t) = 1/[2 sin(t/2) cos(t/2)] = [sin^2(t/2) + cos^(t/2)]/[2 sin(t/2) cos(t/2)] = 1/2 tan(t/2) + 1/2 cot(t/2) Integrating sin^4(x)/cos^(7) directly would yield 1/cos^3(x) after two steps, if you then replace the 1 by sin^2(x) + cos^2(x), you get the 1/cos(x) term and the other term can be partially integrated to yield the 1/cos(x) term. So, you then arrive at 1/cos(x) in only 3 steps but you have to keep track of two terms that combine to the 1/cos(x) term. 16. Apr 5, 2010 ### D H Staff Emeritus I like the reduction formula approach better. Personal preference. First convert $\tan^4x/\cos^3x$ to a polyomial in $\sec x$: $$\tan^4x/\cos^3x = (\tan^2x)^2\sec^3x = (\sec^2x-1)^2\sec^3x = \sec^7x - 2\sec^5x + \sec^3x$$ Thus $$I = \int \frac{\tan^4x}{\cos^3x}dx = \int \left(\sec^7x - 2\sec^5x + \sec^3x\right)\,dx$$ The reduction formula applicable to this problem is $$\int sec^nx\,dx =\frac 1 {n-1}\tan x \sec^{n-2} + \frac{n-2}{n-1}\int sec^{n-2}x\,dx$$ Note that integrating the $\sec^7x$ term will result in a solution term and a modification to the $\sec^5x$ term in the integral. Similarly, integrating the $\sec^5x$ term will result in another solution term and a modification to the final $\sec^3x$ term in the integral. Starting with the $\sec^7x$ term, $$\int \sec^7x\,dx = \frac 1 6 \tan x \sec^5 x + \frac 5 6 \int \sec^5 x\,dx$$ Substituting this back into the expression for the integral I, $$I = \frac 1 6 \tan x \sec^5 x + \int \left(-\,\frac 7 6 \sec^5 x + \sec^3 x\right)\,dx$$ Reducing the $\sec^5x$ term yields $$I = \frac 1 6 \tan x \sec^5 x - \,\frac 7 {24} \tan x \sec^3 x + \frac 1 8 \int sec^3 x\,dx$$ Using the reduction formula one last time to simplify that $\sec^3x$ integral, $$I = \frac 1 6 \tan x \sec^5 x - \,\frac 7 {24} \tan x \sec^3 x + \frac 1 {16} \tan x \sec x + \frac 1 {16} \int \sec x\,dx$$ That is as far as the reduction can go. The final integral is well-known (but also takes many forms). I'll use $$\int \sec x\,dx = \ln(\sec x + \tan x)$$ Thus $$I = \frac 1 6 \tan x \sec^5 x - \,\frac 7 {24} \tan x \sec^3 x + \frac 1 {16} \tan x \sec x + \frac 1 {16} \ln(\sec x + \tan x)$$ Making this just a bit prettier, $$I = \frac 1 {48} \Bigl(\tan x \sec x\left(8\sec^4 x - 14 \sec^2 x + 3\right) + 3 \ln(\sec x + \tan x)\Bigr)$$ Last edited: Apr 5, 2010 17. Apr 6, 2010 ### CrimeBeats @D_H comment #9,10: f = sinx sec^n-1 x f = tanx sec^n-2 x f' = (n-2)tan^2 x sec^n-2 x + sec^n x f' = ((n-2)sin^2 x +1)sec^n x whats wrong -.- @Count_Iblis comment#11 : i've tried to think in another way... i supposed that x^4/(x^2-1)^4 = A/(x-1)^4 + B/(x+1)^4 i found A = B = 1/16 then i integrated, the answer i got in this way was -1/(48*(x-1)^3) -1/(48*(x+1)^3) then we put x back as sin.. @D_H comment #12 this might be long... however here it is i made it like S (sec^3 x tan x) (tan^3 x) dx i made f = tan^3 x y' = sec^3 x tan x so its 1/3 * tan^3 x sec^3 x - S (sec^5 x tan^2 x) dx = 1/3 * tan^3 x sec^3 x - S (tan^4 x sec^3 x)dx + S(sec^3 x tan^2 x) dx since the required has repeated, i moved it to the another side... so that S (tan^4 x sec^3 x)dx = 1/6 * tan^3 x sec^3 x + 1/2 * S(sec^3 x tan^2 x) dx after doing almost the same as begin to the integration on the right: = 1/6 * tan^3 x sec^3 x + 1/6 tan x sec^3 x - 1/6 S (sec^5) dx then for the last integration on the right i made d = sec x and thats how i got x^4 / sqrt(x^2 -1) sure its pain to read this :) @D_H comment #16: I guess what i've done in the above solution is reducing the tan.. yours reduced sec... i had to try more :) so... is the answer -1/(48*(x-1)^3) -1/(48*(x+1)^3) is not correct... but why? cant i use partial integration for high powers? 18. Apr 6, 2010 ### D H Staff Emeritus CrimeBeats: I modified your response to take advantage of the LaTex capability offered at PhysicsForums. You might want to consider learning it. You made a sign error here. $\sec^2x = \tan^2x+1$. At this stage you should have obtained $$I = \int \tan^4x \sec^3 x\,dx = \frac 1 6 \tan^3x\sec^3x - \frac 1 2 \int tan^2x\sec^3x\,dx[/itex] You could have done it this way. [tex]\int \frac{u^4}{\sqrt{u^2-1}}\,du = \frac 1 8 \Bigl(u \sqrt{u^2-1} (2 u^2+3)+3 \ln\left(\sqrt(u^2-1)+u\right)\Bigr)$$ Now you have to substituting back in $u=\sec x, $$\int sec^5 x\,dx = \frac 1 8 \Bigl(\sec x \tan x (2 \sec^2x+3)+3 \ln(\sec x + \tan x)\Bigr)$$ Differentiate this. Does that yield the original function? 19. Apr 6, 2010 ### CrimeBeats i dont think i have a sign mistake... it had 2 (-) so i just made it +... can you revise that? 20. Apr 6, 2010 ### D H Staff Emeritus You definitely have a sign error. You properly integrated [itex]\int \tan^4x\sec^3x\,dx$ to yield
$$\int \tan^4x\sec^3x\,dx = \frac 1 3 \tan^3 x \sec^3 x - \int \sec^5 x \tan^2 x\, dx$$

Your mistake was in the next step, where you said
$$\int \tan^4x\sec^3x\,dx = \frac 1 3 \tan^3 x \sec^3 x - \int \tan^4 x \sec^3 x\,dx + \int \sec^3 x \tan^2 x\,dx$$

You need to use $\sec^2x=\tan^2x + 1$ here. You should have obtained

$$\int \tan^4x\sec^3x\,dx = \frac 1 3 \tan^3 x \sec^3 x - \int \tan^4 x \sec^3 x\,dx - \int\sec^3 x \tan^2 x\,dx$$