1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Jul 3, 2015 #1
    1. The problem statement, all variables and given/known data

    Write cos^2(x) as a Taylor series


    2. Relevant equations
    f(x) = cos^2(x)

    3. 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
     
  2. jcsd
  3. Jul 3, 2015 #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
     
  4. Jul 3, 2015 #3

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    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.
     
  5. Jul 3, 2015 #4
    It would be cos squared of x -- cos2x

    My apologies.
     
  6. Jul 3, 2015 #5

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    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: Jul 3, 2015
  7. Jul 3, 2015 #6
    Got it, I get what you are saying and will drive on.
     
  8. Jul 3, 2015 #7

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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: Jul 3, 2015
  9. Jul 3, 2015 #8

    Zondrina

    User Avatar
    Homework Helper

    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: Jul 3, 2015
  10. Jul 3, 2015 #9

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    This is incorrect. You should read what @SammyS said in the post right before yours.
     
  11. Jul 3, 2015 #10

    Zondrina

    User Avatar
    Homework Helper

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

    I was proposing a trivial solution, assuming ##a## was given.
     
  12. Jul 3, 2015 #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.
     
  13. Jul 3, 2015 #12
    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
     
  14. Jul 4, 2015 #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.
     
  15. Jul 4, 2015 #14

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    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) .
     
  16. Jul 4, 2015 #15
    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.
     
  17. Jul 5, 2015 #16

    Mark44

    Staff: Mentor

    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.
     
  18. Jul 5, 2015 #17
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Taylor series for ##\cos^2(x)##
  1. E^(x^2) taylor series (Replies: 4)

  2. Taylor series of ln(x+2) (Replies: 12)

Loading...