• Support PF! Buy your school textbooks, materials and every day products Here!

Integration of a function

  • Thread starter CrimeBeats
  • Start date
  • #1
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)?
 

Answers and Replies

  • #2
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
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 [itex]\int \sec^m x dx[/itex] 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 [itex]\int \sec x dx[/itex].
 
  • #3
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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
No. Here is an example of a reduction formula:

[tex]\int \cos^m x\,dx
= \frac 1 m\cos^{m-1}x\sin x \;+\;\frac{m-1}m\int\cos^{m-2}x\,dx[/tex]

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
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
1,838
7
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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
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 [itex]\cos^mx[/itex] as [itex]\cos^{m-1}x\,\cos x[/itex]. 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

[tex]\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,

[tex]\int f(x)\,dx = u(x) + \int g(x)\,dx[/tex]

Now suppose we want to integrate [itex]\cos^n x[/itex] wrt x. Let's guess the solution involves [itex]u(x)=\sin x\cos^{n-1}x[/itex] in some way. Differentiating wrt x,

[tex]\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[/tex]

and thus

[tex]\int \cos^n\,x dx =
\frac 1 n \sin x\cos^{n-1}x + \frac{n-1}n\int \cos^{n-2}x\,dx[/tex]



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

[tex]\int sec^n x\, dx[/tex]

to something simpler. Before I give the answer away, try differentiating [itex]\sin x \sec^{n-1} x[/itex] with respect to x.
 
  • #8
@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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
@D_H
what do you exactly mean by "differentiate" ..?
i know that sinx sec^n-1 x is tan(x) * sec^n-2(x)
Differentiate means "compute the derivative of".
 
  • #10
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
Just to be crystal clear, try computing

[tex]\frac d{dx}(\sin x\cdot \sec^{n-1}x)[/tex]

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 [itex]\int \sec^n x\,dx[/itex] will help is because [itex]\tan^4x/\cos^3x = (tan^2 x)^2\sec^3 x = (\sec^2 x - 1)^2\sec^3 x[/itex].
 
Last edited:
  • #11
1,838
7
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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
Back to the original post,

After about a page of work, i found that i must integrate this:
x^4 / sqrt(x^2 -1)
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
1,838
7
I now see a one line solution to the integral, so simple that you can do it without paper and pencil. :redface:
 
  • #14
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
I get a one-line solution in the end, but getting there is ugly. Did you use half-angle formulae or some such?
 
  • #15
1,838
7
I get a one-line solution in the end, but getting there is ugly. Did you use half-angle formulae or some such?
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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
I like the reduction formula approach better. Personal preference.

First convert [itex]\tan^4x/\cos^3x[/itex] to a polyomial in [itex]\sec x[/itex]:

[tex]\tan^4x/\cos^3x = (\tan^2x)^2\sec^3x = (\sec^2x-1)^2\sec^3x
= \sec^7x - 2\sec^5x + \sec^3x[/tex]

Thus

[tex]I = \int \frac{\tan^4x}{\cos^3x}dx
= \int \left(\sec^7x - 2\sec^5x + \sec^3x\right)\,dx[/tex]

The reduction formula applicable to this problem is

[tex]\int sec^nx\,dx
=\frac 1 {n-1}\tan x \sec^{n-2} + \frac{n-2}{n-1}\int sec^{n-2}x\,dx[/tex]

Note that integrating the [itex]\sec^7x[/itex] term will result in a solution term and a modification to the [itex]\sec^5x[/itex] term in the integral. Similarly, integrating the [itex]\sec^5x[/itex] term will result in another solution term and a modification to the final [itex]\sec^3x[/itex] term in the integral.

Starting with the [itex]\sec^7x[/itex] term,

[tex]\int \sec^7x\,dx = \frac 1 6 \tan x \sec^5 x + \frac 5 6 \int \sec^5 x\,dx[/tex]

Substituting this back into the expression for the integral I,

[tex]I = \frac 1 6 \tan x \sec^5 x +
\int \left(-\,\frac 7 6 \sec^5 x + \sec^3 x\right)\,dx[/tex]

Reducing the [itex]\sec^5x[/itex] term yields

[tex]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[/tex]

Using the reduction formula one last time to simplify that [itex]\sec^3x[/itex] integral,

[tex]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[/tex]

That is as far as the reduction can go. The final integral is well-known (but also takes many forms). I'll use

[tex]\int \sec x\,dx = \ln(\sec x + \tan x)[/tex]

Thus

[tex]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)[/tex]

Making this just a bit prettier,

[tex]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)[/tex]
 
Last edited:
  • #17
@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
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
CrimeBeats: I modified your response to take advantage of the LaTex capability offered at PhysicsForums. You might want to consider learning it.

@D_H comment #12
this might be long... however here it is
i made it like [itex]I = \int (\sec^3 x \tan x) (\tan^3 x)\,dx[/itex]
i made [itex]f = tan^3 x[/itex], [itex]y' = sec^3 x tan x[/itex]
so its

[tex]\aligned
I &= \frac 1 3 \tan^3 x \sec^3 x - \int (\sec^5 x \tan^2 x)\, 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
\endaligned[/tex]

since the required has repeated, i moved it to the another side... so that

[tex]I = \frac 1 6 \tan^3 x \sec^3 x + \frac 1 2 \int (\sec^3 x \tan^2 x) dx[/tex]
You made a sign error here. [itex]\sec^2x = \tan^2x+1[/itex]. At this stage you should have obtained

[tex]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]

after doing almost the same as begin to the integration on the right:

[tex]I = \frac 1 6 \tan^3 x \sec^3 x + \frac 1 6 \tan x \sec^3 x
- \frac 1/6 \int (sec^5)\,dx[/tex]

then for the last integration on the right i made d = sec x and thats how i got x^4 / sqrt(x^2 -1)
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)[/tex]

Now you have to substituting back in [itex]u=\sec x[/tex],

[tex]\int sec^5 x\,dx
= \frac 1 8 \Bigl(\sec x \tan x (2 \sec^2x+3)+3 \ln(\sec x + \tan x)\Bigr)[/tex]


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?
Differentiate this. Does that yield the original function?
 
  • #19
i dont think i have a sign mistake... it had 2 (-) so i just made it +... can you revise that?
 
  • #20
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
682
You definitely have a sign error.

You properly integrated [itex]\int \tan^4x\sec^3x\,dx[/itex] to yield
[tex]
\int \tan^4x\sec^3x\,dx
= \frac 1 3 \tan^3 x \sec^3 x - \int \sec^5 x \tan^2 x\, dx[/tex]

Your mistake was in the next step, where you said
[tex]
\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[/tex]

You need to use [itex]\sec^2x=\tan^2x + 1[/itex] here. You should have obtained

[tex]
\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[/tex]
 
  • #21
1,838
7
@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
D.H. already pointed out that this can't be right. You can ask how you still found A and B and what that means. The terms A/(x-1)^4 and
B/(x+1)^4 correctly describe the leading behavior at the singularities at x = ±1. But there are less singular terms as well that are missing. The question is as always: How can you obtain the correct result with the least amount of computations?

In this case writing out the full partial fraction expansion with undetermined coefficients is not recommended, as that involves a lot unnecessary computations. The more computations you have to do, the greater the chances of error are. In general (not just for patial fractioin expansions), this means that you have to master many different methods to solve the same type of problems, even if one particular method would suffice. Learning to select an efficient method is as much part of learning math as learning to use some general method.

So, when you wrote down the partial fraction expansion of x/(x^2-1) to try to extract the partial fraction expansion of its fourth power, that was a good move. However, you went wrong when you wrote down the incomplete partial fraction expansion of the fourth power. So, let's try something different. We have:

[x/(x^2-1)]^4 = 1/(x-1)^4 [x/(x+1)]^4

What we need to do is to expand [x/(x+1)]^4 around
x = 1 to third order. That will yield all the singular terms of the expansion around x = 1. You then don't have to compute the singular terms of the expansion around x = -1, as they all follow from the first expansion by using that the function is an even function. Like partial fraction expansions, there are many different ways to do series expansions, and the method that is the most universal (i.e. using the Taylor expansion formula) is usually the most inefficient method and should thus be avoided. Let's write

x = 1 + t

then we need to expand in powers of t.

We have:

x/(x+1) = 1 - 1/(x+1) = 1 - 1/(2+t) =

1/2 + t/4 - t^2/8 + t^3/16 + ...

You can directly take the fourth power of this expansion. You can also take the logarithm, expand the logarithm, multiply by 4, take the exponential and then expand that. This is, believe it or not, far simpler than directly computing the fourth power:

Log[1/2 + t/4 - t^2/8 + t^3/16 + ...] =

Log(1/2) + Log[1 + t/2 - t^2/4 + t^3/8 + ...] =

Log(1/2) + t/2 - t^2/4 + t^3/8+... - (t/2 - t^2/4+...)^2/2 +

(t/2 +...)^3/3 +... =

Log(1/2) + t/2 - t^2/4 - t^2/8 + t^3/8+ t^3/8 + t^3/24 =

Log(1/2) + t/2 - 3/8 t^2 +7/24 t^3 + ...

We then have:

Exp[4 (Log(1/2) + t/2 - 3/8 t^2 +7/24 t^3 +...)] =

1/16 Exp[2 t - 3/2 t^2 + 7/6 t^3 + ...] =

1/16 [1 + (2 t - 3/2 t^2 + 7/6 t^3 + ...) + (2 t - 3/2 t^2 + ...)^2/2 + (2 t +...)^3/6 + ....] =

1/16 [1 + 2 t - 3/2 t^2 + 2 t^2 + 7/6 t^3 -3 t^3 + 4/3 t^3 + ...] =

1/16 + 1/8 t + 1/32 t^2 -1/32 t^3 + terms of order t^4 and higher

This yields the expansion:

1/(x-1)^4 [x/(x+1)]^4 =

1/16 1/(x-1)^4 + 1/8 1/(x-1)^3 + 1/32 1/(x-1)^2 -1/32 1/(x-1) + regular terms

If we now replace x by -x on both sides then the lefth hand side stays the same becaiuse the function is even. The full right hand side also stays the same if you include all the regular terms. However, the singular and regular terms separately do not stay the same. What is clear is that the singular terms of the expansion around 1 become precisely the singular terms in the expansion around -1. So, the sum of all the singular terms of both expansions is:

1/16 1/(x-1)^4 + 1/8 1/(x-1)^3 + 1/32 1/(x-1)^2 -1/32 1/(x-1)

1/16 1/(x+1)^4 - 1/8 1/(x+1)^3 + 1/32 1/(x+1)^2 + 1/32 1/(x+1)


And this is then the desired partial fraction expansion, as this expression has exactly the same singular behavior as the original ratonal expression. The difference between this expression and the rational function is certainly a rational function, but one without any siungularities and is thus a polynomial. However it is clear that for x to infinity, this polynomial would have to have a limit of zero, which means that the polynomial is in fact identical to zero.
 
  • #22
thanks for helping. made me understand integration yet deeper.. although this is not required for me... yet.
 

Related Threads for: Integration of a function

  • Last Post
Replies
2
Views
1K
Replies
11
Views
2K
Replies
2
Views
2K
  • Last Post
Replies
7
Views
668
  • Last Post
Replies
2
Views
594
  • Last Post
Replies
5
Views
977
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
2K
Top