Using a power series to approximate a definite integral

In summary, the conversation is discussing how to use a power series to approximate the integral of cos 4x log x from pi to 2pi to six decimal places. The conversation covers different approaches, including breaking up the integration into smaller intervals, expanding the log instead of the sin or cos, and iteratively integrating the sin 4x/x term. Ultimately, the best approach is to shift the integration variable and expand the log function in series, which requires 13 terms to obtain an accurate result.
  • #1
wilcofan3
27
0
How do I go about finishing/calculating this?

Homework Statement


Use a power series to approximate [tex]\int\cos 4x\log x dx[/tex] to six decimal places. (bounds are from pi to 2pi)

Homework Equations


The Attempt at a Solution


So I broke down the equation first:

[tex]\int\cos 4x\log x dx = \frac{1}{4}\sin 4x\log x - \frac{1}{4}\int \frac{\sin 4x}{x}dx[/tex]

Now I am using the fact that [tex]\sin x = \sum_{n=0}^\infty(-1)^n\frac{(4x)^{2n+1}}{(2n+1)!}\Rightarrow \frac{\sin x}{x} = \sum_{n=0}^\infty(-1)^n\frac{4^{2n+1}x^{2n}}{(2n+1)!}[/tex].


This is a really stupid question probably, but I don't understand how to go about finishing the problem even though I think I have the right idea.

What I don't understand is how the bounds play a part in this. Am I just calculating that last series to six decimal places?
 
Physics news on Phys.org
  • #2
Now you want to integrate the last series dx and approximate it's value at pi and 2*pi to six decimal places. It's an alternating series, so there's a pretty easy error estimate you can use to figure out how many terms to keep.
 
  • #3
It looks like you will need many terms in this approach. Expanding sin(4x) around zero while you need to integrate it from pi to 2 pi is asking for problems. At x = 2 pi the argument of the Sin is 8 pi = approximately 24. Insert x = 24 in the series expansion for sin(x) to see when the terms get small... I think you need to go as far as n = 40 or so...

Expanding sin(4x) around x = 3/2 pi is better, but it is still not the best way to go about. The interval over which you have to integrate is quite long, you have to integrate over twice the period of the cos function. So, this suggests that you should break up the integral from pi to 2 pi into smaller intervals an then do a power series expansion around the mid point of each interval. You can also try to expand the log instead of the sin or cos.

Another option is to iterate the partial integrations a few times more. I.e. you integrate the sin(4x)/x again by integrating the sin(4x) factor and then you end up with the integral of cos(4x)/x^2. Do this again and you see that you end up with sin(4x)/x^3. Because the power of x in the denominator grows at each step, the integral becomes smaller, at least at first. What you get is a divergent asymptotic expansion. I'm not sure you can get to 6 decimal places before the series starts to diverge, though.
 
  • #4
There aren't any convergence problems here. sin(4x)/x has an infinite radius of convergence around x=0. Look at the terms in the series and apply the ratio test. And you won't need that many terms. (2n+1)! grows pretty fast.
 
Last edited:
  • #5
Dick said:
There aren't any convergence problems here. sin(4x)/x has an infinite radius of convergence around x=0. Look at the terms in the series and apply the ratio test. And you won't need that many terms. (2n+1)! grows pretty fast.

Try to compute sin(8 pi) using the power series. Sure, it converges (to zero of course). How many terms do you need? Well, let's simply see for what n we get the largest term in the series. It is easy to see that the function f(n) = lambda^n/n! has a maximum at approximately
n = lambda, if lambda is not too small. Now, 8 pi = approximately 25, so the maximum should occur for n = 12, the term being

(8 pi)^25/25! = approximately 6.5*10^9

So, you clearly do need many terms. That's not the only problem. You also need a result that is quite accurate. This means that you need to evaluate all the terms, including the very large terms, to a sufficient acccuracy. To see that
sin(8pi) is zero to 6 decimal places, you need to keep more than 16 significant figures in the n = 12 term.
 
  • #6
I would solve the problem as follows. We have

[tex]\int_{\pi}^{2\pi}\cos(4x)\log(x)dx=\frac{1}{4}\int_{4\pi}^{8\pi}\cos(t)\log\left(\frac{t}{4}\right)dt=\int_{4\pi}^{8\pi}\cos(t)\log(t)dt[/tex]

Shift the integration variable to rewrite the integral as:

[tex]\frac{1}{4}\int_{-2\pi}^{2\pi}\cos(6\pi+v)\log(6\pi+v)dv=\frac{1}{4}\int_{-2\pi}^{2\pi}\cos(v)\log(6\pi+v)dv=[/tex]
[tex]\frac{1}{4}\int_{-2\pi}^{2\pi}\cos(v)\log\left(1+\frac{v}{6\pi}\right)dv[/tex]

Expand Log(1+v/(6 pi)) in series and integrate term by term. You need 13 terms to obtain the result:

[tex]\int_{\pi}^{2\pi}\cos(4x)\log(x)dx\approx -9.74251485155\times 10^{-3}[/tex]
 
Last edited:
  • #7
Count Iblis said:
Try to compute sin(8 pi) using the power series. Sure, it converges (to zero of course). How many terms do you need? Well, let's simply see for what n we get the largest term in the series. It is easy to see that the function f(n) = lambda^n/n! has a maximum at approximately
n = lambda, if lambda is not too small. Now, 8 pi = approximately 25, so the maximum should occur for n = 12, the term being

(8 pi)^25/25! = approximately 6.5*10^9

So, you clearly do need many terms. That's not the only problem. You also need a result that is quite accurate. This means that you need to evaluate all the terms, including the very large terms, to a sufficient acccuracy. To see that
sin(8pi) is zero to 6 decimal places, you need to keep more than 16 significant figures in the n = 12 term.

You are right. 8pi is too large to make the series manageable. Looks like you do need to break the expansion into smaller intervals.
 

Related to Using a power series to approximate a definite integral

What is a power series?

A power series is an infinite series of the form ∑n=0ⁿaₙxⁿ, where aₙ is a sequence of numbers and x is a variable. It can be used to express a wide range of functions, including trigonometric, exponential, and logarithmic functions.

How can a power series be used to approximate a definite integral?

A power series can be used to approximate a definite integral by replacing the integrand with its corresponding power series and then evaluating the resulting infinite series. The more terms that are included in the series, the more accurate the approximation will be.

What are the benefits of using a power series to approximate a definite integral?

Using a power series to approximate a definite integral can be advantageous because it allows for the calculation of integrals that are difficult or impossible to solve using traditional methods. It also provides a more accurate result compared to using numerical methods.

What is the process for using a power series to approximate a definite integral?

The process for using a power series to approximate a definite integral involves finding the power series representation of the integrand, determining the interval of convergence, and then evaluating the infinite series using the given limits of integration.

What are some limitations of using a power series to approximate a definite integral?

One limitation of using a power series to approximate a definite integral is that it may not always converge to the exact value of the integral. Additionally, the process can be time-consuming and may require a large number of terms to achieve a desired level of accuracy.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
508
  • Calculus and Beyond Homework Help
Replies
1
Views
420
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
777
  • Calculus and Beyond Homework Help
Replies
2
Views
333
  • Calculus and Beyond Homework Help
Replies
3
Views
403
  • Calculus and Beyond Homework Help
Replies
1
Views
580
  • Calculus and Beyond Homework Help
Replies
1
Views
307
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
17
Views
734
Back
Top