Taylor series for ##\cos^2(x)##

In summary, the student is trying to solve a problem where they know the cosine function as a Taylor series, but are having difficulty integrating the series. They attempted to solve the problem by using the 1 - (x^2/2!) + (x^4/4!) - (x^6/6!) + (x^8/8!) - (x^10/10!) + … method, but ended up with a mess. They were then helped by a fellow student, who told them how to use the double angle formula to replace x in the Taylor series.
  • #1
SYoungblood
64
1

Homework Statement


[/B]
Write cos^2(x) as a Taylor series

Homework Equations


f(x) = cos^2(x)

The Attempt at a Solution


I am stumped.

The cosine function as a Taylor series is 1 - (x^2/2!) + (x^4/4!) - (x^6/6!) + (x^8/8!) - (x^10/10!) + …

I have to express it as cos^2(x) and I am making a pig's ear out of it. This problem is to evaluate the integral between an upper and lower limit, that I will work at finding on my own, but I can't even seem to get the Taylor series right.

I tried 1^2 - (x^2/2!)^2 + (x^4/4!)^2 - (x^6/6!)^2 + (x^8/8!)^2 - (x^10/10!)^2 + …

and turned this into a total mess.

Tahnk you for your help in advance.

SY
 
Physics news on Phys.org
  • #2
I should add, this is one of those problems where you find a value up to a given error of magnitude, so I still have to evaluate the definite integral. The lower limit of the problem at hand is zero, so I am essentially just evaluating one limit after I integrate the series that is kicking my posterior. I didn't want to ask the forum to do my probe;em for me, but i really am coming up with nothing for what I posted above.

SY
 
  • #3
Er - isn't that just wherever you have written x you write (2x) ? (In brackets to avoid later mistakes of interpretation.)
The very meaning of algebraic symbolism.
 
  • #4
It would be cos squared of x -- cos2x

My apologies.
 
  • #5
Oh well that is.more difficult, but it was a lucky mistake because it reminds that there is a relation between cos(2x) and cos2x, though I think it can be done without that and for any function.
 
Last edited:
  • #6
epenguin said:
Oh well that is.more difficult, but it was a lucky mistake because it reminds that there is a relation between cos(2x) and cos2x, though I think if can be done without that and for any function.

Got it, I get what you are saying and will drive on.
 
  • #7
SYoungblood said:

Homework Statement


[/B]
Write cos^2(x) as a Taylor series

Homework Equations


f(x) = cos^2(x)

The Attempt at a Solution


I am stumped.

The cosine function as a Taylor series is 1 - (x^2/2!) + (x^4/4!) - (x^6/6!) + (x^8/8!) - (x^10/10!) + …

I have to express it as cos^2(x) and I am making a pig's ear out of it. This problem is to evaluate the integral between an upper and lower limit, that I will work at finding on my own, but I can't even seem to get the Taylor series right.

I tried 1^2 - (x^2/2!)^2 + (x^4/4!)^2 - (x^6/6!)^2 + (x^8/8!)^2 - (x^10/10!)^2 + …

and turned this into a total mess.

Thank you for your help in advance.

SY
It can't be 1^2 - (x^2/2!)^2 + (x^4/4!)^2 - (x^6/6!)^2 + (x^8/8!)^2 - (x^10/10!)^2 + … . I assume you got that by squaring each term but kept the sign for each.

Is (a + b + c)2 = a2 + b2 + c2 ? - - - or Is (a - b + c)2 = a2 - b2 + c2 ?

Of course the answer is NO to each.

How do you multiply: (1 - (x2/2!) + (x4/4!) - (x6/6!) + (x8/8!) - (x10/10!) + … ) × (1 - (x2/2!) + (x4/4!) - (x6/6!) + (x8/8!) - (x10/10!) + … ) ?

This idea works for the square of any function.

For ##\displaystyle \ \cos^2(x) \,,\ ## you may want to use ##\displaystyle \ \cos^2(x)=\frac{1+\cos(2x)}{2} \ .##
 
Last edited:
  • #8
It would be helpful if you told us what ##a## is in the Taylor series formula:

$$f(x) = \sum_{n = 0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n$$

If ##a = 0## in the problem statement, and you happen to know the Maclaurin series for ##\text{cos}(x)##, then you can square it:

$$\text{cos}(x) = \sum_{n = 0}^{\infty} (-1)^n \frac{x^{2n}}{(2n)!}$$
$$\text{cos}^2(x) = \left(\sum_{n = 0}^{\infty} (-1)^{n} \frac{x^{2n}}{(2n)!^2} \right)^2$$
 
Last edited:
  • #9
Zondrina said:
If ##a = 0## in the problem statement, and you happen to know the Maclaurin series for ##\text{cos}(x)##, then you can square it:

$$\text{cos}(x) = \sum_{n = 0}^{\infty} (-1)^n \frac{x^{2n}}{(2n)!}$$
$$\text{cos}^2(x) = \sum_{n = 0}^{\infty} \frac{x^{4n}}{((2n)!)^2}$$
This is incorrect. You should read what @SammyS said in the post right before yours.
 
  • #10
vela said:
This is incorrect. You should read what @SammyS said in the post right before yours.

I got jumbled in the latex there for a moment. I fixed my post.

I was proposing a trivial solution, assuming ##a## was given.
 
  • #11
It's probably easiest to use the double angle formula and replace ##x## in the Taylor expansion of ##\cos## with ##2x##, then add and multiply any factors as per the double angle formula.
 
  • #12
Dazed&Confused said:
It's probably easiest to use the double angle formula and replace ##x## in the Taylor expansion of ##\cos## with ##2x##, then add and multiply any factors as per the double angle formula.
That is the easiest way to do it, if you want to complicate things like I do, you lay seyset f(x) = cos(x)^2, f'(x) = -sin(2x), f''(x) = -2cos(2x), f'''(x) = 4sin(2x), and expand it that way, but if course that is useless :p so you go with cos(x)^2 = (1+cos(2x))/2
 
  • #13
Follow the usual recipe rather than trying to use the Taylor expansion of cos(x).

Compute f'(x), f''(x), etc.

Evaluate each at x = 0.

Plug into Taylor expansion formula.
 
  • Like
Likes SammyS
  • #14
Dr. Courtney said:
Follow the usual recipe rather than trying to use the Taylor expansion of cos(x).

Compute f'(x), f''(x), etc.

Evaluate each at x = 0.

Plug into Taylor expansion formula.
In my experience, the usual way to approach a problem like this, with a composition of a function having a well-known Taylor expansion and a simple algebraic function, is to use that well-known Taylor expansion and do some basic algebra to get the desired result, rather than generating all those derivatives, etc.

However, for the function here, what Dr. Courtney suggests works very nicely. It will work using f(x) = cos2(x) just like it is. It will give you some practice with the product rule & chain rule. It also works well (maybe even a little better) using the double angle version of f(x) .
 
  • Like
Likes SYoungblood and Dr. Courtney
  • #15
SammyS said:
In my experience, the usual way to approach a problem like this, with a composition of a function having a well-known Taylor expansion and a simple algebraic function, is to use that well-known Taylor expansion and do some basic algebra to get the desired result, rather than generating all those derivatives, etc.

However, for the function here, what Dr. Courtney suggests works very nicely. It will work using f(x) = cos2(x) just like it is. It will give you some practice with the product rule & chain rule. It also works well (maybe even a little better) using the double angle version of f(x) .

When I taught Calculus, we tried to steer students towards approaches that were most likely to give them more practice in skills they were more likely to need downstream. The technical core at the Air Force Academy used the product and chain rules a lot more than the double angle formulas, and we got a lot more feedback from engineering departments when their majors stumbled using the chain rule in later classes than we got regarding double angle formulas.

I also like to help students realize that when the approach they've originally selected to work a problem isn't working, it can be useful to zoom back out and try another approach. A big part of mathematical maturity is being able to start over with a fresh approach when one gets stuck rather than stubbornly sticking with the initial choice of approach. Just because a problem _can_ be solved with a given method doesn't mean that it's the only method that can be used. Students need to learn to back out of blind alleys and take a different path. A shot cut isn't a short cut if it doesn't yield the right answer quickly.
 
  • Like
Likes epenguin
  • #16
Dr. Courtney said:
When I taught Calculus, we tried to steer students towards approaches that were most likely to give them more practice in skills they were more likely to need downstream. The technical core at the Air Force Academy used the product and chain rules a lot more than the double angle formulas, and we got a lot more feedback from engineering departments when their majors stumbled using the chain rule in later classes than we got regarding double angle formulas.
I agree that it is important for calculus students to be well-practiced in using the product and chain rules, but that should not come at the expense of useful trig identities, such as the double-angle identities, which come into play again in integration problems such as ##\int \cos^2(x) dx## and ##\int \sin^2(x) dx##. While the approach you suggested for this problem is a good one (after all, it uses the definition of Taylor's series), the approach suggested by @SammyS is a better one IMO.
 
  • Like
Likes SYoungblood and Dr. Courtney
  • #17
Mark44 said:
I agree that it is important for calculus students to be well-practiced in using the product and chain rules, but that should not come at the expense of useful trig identities, such as the double-angle identities, which come into play again in integration problems such as ##\int \cos^2(x) dx## and ##\int \sin^2(x) dx##. While the approach you suggested for this problem is a good one (after all, it uses the definition of Taylor's series), the approach suggested by @SammyS is a better one IMO.

There may be time for all that in a 4 or 5 hr calculus class, but not so much in a 3 hour class. The faculty made a conscious choice to only teach one trig identity (cos^2(x) + sin^2(x) = 1) and focus on the material that was most needed in subsequent courses.

##\int \cos^2(x) dx## and ##\int \sin^2(x) dx## can both be worked without any trig identities by using integration by parts twice, so we taught them that way to reinforce integration by parts.
 

1. What is a Taylor series?

A Taylor series is a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivatives at a single point.

2. How do you find the Taylor series for ##\cos^2(x)##?

The Taylor series for ##\cos^2(x)## can be found by using the general formula for a Taylor series, substituting ##\cos^2(x)## for the function, and calculating the derivatives of ##\cos^2(x)## at the desired point.

3. What is the Taylor series for ##\cos^2(x)## centered at ##x = 0##?

The Taylor series for ##\cos^2(x)## centered at ##x = 0##, also known as the Maclaurin series, is ##1 - \frac{x^2}{2} + \frac{x^4}{24} - \frac{x^6}{720} + \cdots##

4. How accurate is the Taylor series for ##\cos^2(x)##?

The Taylor series for ##\cos^2(x)## is accurate to the degree of the polynomial used in the series. The more terms that are included, the more accurate the approximation will be.

5. What is the significance of the Taylor series for ##\cos^2(x)##?

The Taylor series for ##\cos^2(x)## can be used to approximate the value of ##\cos^2(x)## at any point, which can be helpful in solving complex mathematical problems and making predictions in various fields such as physics and engineering.

Similar threads

  • Calculus and Beyond Homework Help
Replies
27
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
56
  • Calculus and Beyond Homework Help
Replies
7
Views
921
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
128
Back
Top