Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Math Help - Help working out a Taylor series of cos3x

  1. #1
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81

    Help working out a Taylor series of cos3x

    I've just covered Taylor polynomials and series theory, but there are precious few examples so i'm trying to do the following exercise:

    Compute Taylor series of f(x) = cos 3x at pi/12

    My attempted answer:

    f(x)= cos3x = cos pi/4
    f'(x) = -3 sin 3x = -3 sin pi/4
    f''(x) = -9 cos 3x = -9 cos pi/4
    etc

    so Tn cos3x = cos3x + (-3 sin 3x) x/2! + (-9 cos pi/4) x^2/ 3!...

    I can't figure how I should go about formulating a series formula for this , especially as trig functions are involved. I'm also not even sure I'm doing the Taylor formula right as i've seen some wierd trig series. Any advice on how to start would be much appreciated

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member kalyanram's Avatar
    Joined
    Jun 2008
    From
    Bangalore, India
    Posts
    143
    Thanks
    14
    Taylor's formula is
    f(x) = f(a) + \frac{x-a}{1!}f^{'}(a) + \frac{(x-a)^2}{2!}f^{"}(a) + ......... + \frac{(x-a)^n}{n!}f^{(n)}(a) now a=\frac{\pi}{12} reevaluate your series as you are missing the (x-a)^n terms in your expansion.

    Kalyan.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,786
    Thanks
    1570
    Quote Originally Posted by iva View Post
    I've just covered Taylor polynomials and series theory, but there are precious few examples so i'm trying to do the following exercise:

    Compute Taylor series of f(x) = cos 3x at pi/12

    My attempted answer:

    f(x)= cos3x = cos pi/4
    f'(x) = -3 sin 3x = -3 sin pi/4
    f''(x) = -9 cos 3x = -9 cos pi/4
    etc

    so Tn cos3x = cos3x + (-3 sin 3x) x/2! + (-9 cos pi/4) x^2/ 3!...

    I can't figure how I should go about formulating a series formula for this , especially as trig functions are involved. I'm also not even sure I'm doing the Taylor formula right as i've seen some wierd trig series. Any advice on how to start would be much appreciated

    Thanks
    Note that \displaystyle \cos{\frac{\pi}{4}} = \frac{1}{\sqrt{2}} and \displaystyle \sin{\frac{\pi}{4}} = \frac{1}{\sqrt{2}}.
    Last edited by Prove It; April 2nd 2011 at 01:06 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81
    Thank you, so the corrected taylor polynomial, where a=pi/12, is
    Thank you

    so Tn cos3x = cos3x + (-3 sin 3x) (x-a)/2! + (-9 cos 3x) (x-a)2/ 3!... = cos pi/4 + (-3 sin pi/4) (x-pi/12)/2! + (-9 cos pi/4) (x-pi/12)2/ 3!... = 1/root(2) -3/root(2) (x-pi/2)/2 - ( 3/2 )(x- pi/12)^2/ root(2)...

    But how do i go about rewording this into to a series?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,786
    Thanks
    1570
    It IS a series...
    Follow Math Help Forum on Facebook and Google+

  6. #6
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81
    Sorry i meant, into the summation statement (at least I think that is what its called)
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member kalyanram's Avatar
    Joined
    Jun 2008
    From
    Bangalore, India
    Posts
    143
    Thanks
    14
    I did not understand your doubt but if you are trying to make a concise expression make the following observations
    f(\frac{\pi}{12}) = \frac{1}{\sqrt2}
    f^{'}(\frac{\pi}{12}) = -\frac{1}{\sqrt2}.3
    f^{"}(\frac{\pi}{12}) = -\frac{1}{\sqrt2}.3^2
    f^{'''}(\frac{\pi}{12}) = \frac{1}{\sqrt2}.3^3
    .... so the generalized nth term is cos(\frac{(n-1)\pi}{2}+\frac{\pi}{4}).3^{n-1}\frac{(x-\frac{\pi}{12})^{n-1}}{(n-1)!}

    f(x) = \displaystyle\sum_{i=1}^{n}cos(\frac{(i-1)\pi}{2}+\frac{\pi}{4})\frac{(3x-\frac{\pi}{4})^{i-1}}{(i-1)!}

    Kalyan
    Last edited by kalyanram; April 1st 2011 at 11:00 AM.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81
    Gosh, maybe i am getting ahead of my course material because i am battling to understand how to generalize it as you have done in the last 2 lines. Thank you so much, I need to read up more on this
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member kalyanram's Avatar
    Joined
    Jun 2008
    From
    Bangalore, India
    Posts
    143
    Thanks
    14
    Quote Originally Posted by iva View Post
    Gosh, maybe i am getting ahead of my course material because i am battling to understand how to generalize it as you have done in the last 2 lines. Thank you so much, I need to read up more on this
    I am sure that the generalization is within the scope of your of your course material but you have to take note of a some facts before you proceed to the generalized term.

    \bd{FIRST}
    Lets consider the values contributed by cos\frac{\pi}{12} term in each term
    f(\frac{\pi}{12}) = \frac{1}{\sqrt2}
    f^{'}(\frac{\pi}{12}) = \bd{-\frac{1}{\sqrt2}}.3
    f^{"}(\frac{\pi}{12}) = \bd{-\frac{1}{\sqrt2}}.3^2
    f^{'''}(\frac{\pi}{12}) = \bd{\frac{1}{\sqrt2}}.3^3
    f^{(4)}(\frac{\pi}{12}) = \bd{\frac{1}{\sqrt2}}.3^4
    So you see that the pattern is recursive in the sense that you have \frac{1}{\sqrt2}, \frac{-1}{\sqrt2}, \frac{-1}{\sqrt2}, \frac{1}{\sqrt2},\frac{1}{\sqrt2}, \frac{-1}{\sqrt2}, \frac{-1}{\sqrt2}, \frac{1}{\sqrt2}, .......

    \bd{SECOND}
    We need to find a trigonometric function fitting the pattern so all I did was observe that the pattern is recursive over four terms with signs of the terms occurring as +,-,-,+,.... this is the cos pattern i.e cosine function is +ve in first quadrant, -ve in the second, -ve in the third and again +ve in fourth quadrant so I was sure cos would fit in. And cos(\frac{\pi}{4}) = \frac{1}{\sqrt2} so I use \frac{(n-1)\pi}{2} to generate the quadrant nature and add \frac{\pi}{4} to it.

    \bd{THIRD}
    The powers of 3^{n-1} occurring due to the derivative can be clubbed with the \frac{(x-\frac{\pi}{12})^{n-1}}{(n-1)!} term to create \frac{(3x-\frac{\pi}{4})^{n-1}}{(n-1)!} term. When n=1 this term is in fact 1 (I hope you can observe that) so just leaving you with cos(\frac{\pi}{4}) = \frac{1}{\sqrt2} it fits in nicely.

    \bd{FOURTH}
    Voila!.. As everything is in place you can now generalize it as f(x) = \displaystyle\sum_{i=1}^{n}cos(\frac{(i-1)\pi}{2}+\frac{\pi}{4})\frac{(3x-\frac{\pi}{4})^{i-1}}{(i-1)!}.

    \bd{NOTE:} That you could have generated a function say (-1)^{[0.5n]}\frac{1}{\sqrt2} where [0.5n] denotes the greatest integer function as n \in {1,2,3,4,5,.....} also generates the same sign pattern of +,-,-,+,+,-,-,+,.... so I could have said that the generalized nth term is (-1)^{[0.5n]}\frac{1}{\sqrt2}\frac{(3x-\frac{\pi}{4})^{n-1}}{(n-1)!}
    but I choose the cosine function to give the function a trigonometric touch. As you see the generalization is all about observation and packing things into a nice presentable form and its all about how you want to present your function in the generalized form and there is no one concrete way to say that this is the only way as I have discussed it.

    So the Taylor series can be expressed as
    f(x) = \displaystyle\sum_{i=1}^{n}cos(\frac{(i-1)\pi}{2}+\frac{\pi}{4})\frac{(3x-\frac{\pi}{4})^{i-1}}{(i-1)!}

    or as
    f(x) = \displaystyle\sum_{r=1}^{n}(-1)^{[0.5r]}\frac{1}{\sqrt2}\frac{(3x-\frac{\pi}{4})^{r-1}}{(r-1)!}

    which ever way you choose

    Hope that helps without confusing much ...
    Kalyan
    Follow Math Help Forum on Facebook and Google+

  10. #10
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81

    Help working out a Taylor series of cos3x

    Wow that makes alot more sense now. but the part where you fit in the 3 to the power term doesn't though ie :

    \bd{THIRD}
    The powers of 3^{n-1} occurring due to the derivative can be clubbed with the \frac{(x-\frac{\pi}{12})^{n-1}}{(n-1)!} term to create \frac{(3x-\frac{\pi}{4})^{n-1}}{(n-1)!} term. When n=1 this term is in fact 1 (I hope you can observe that) so just leaving you with cos(\frac{\pi}{4}) = \frac{1}{\sqrt2} it fits in nicely.
    1st term is ok, but the 2nd onward not, the Taylor definition uses the \frac{(x-a)^{n-1}}{(n-1)!} and you slotted in the 3 there but when i try calculate the 2nd term from this i get (3x - \frac{\pi}{12}) \neq 3 , 3rd term \frac{(x-\frac{\pi}{12})^{2}}{2} \neq 3^{2} etc
    I don't understand this. I would have put 3^{n-1} but i know that is wrong and also not Taylorish
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Member kalyanram's Avatar
    Joined
    Jun 2008
    From
    Bangalore, India
    Posts
    143
    Thanks
    14
    Quote Originally Posted by iva View Post
    1st term is ok, but the 2nd onward not, the Taylor definition uses the \frac{(x-a)^{n-1}}{(n-1)!} and you slotted in the 3 there but when i try calculate the 2nd term from this i get (3x - \frac{\pi}{12}) \neq 3 , 3rd term \frac{(x-\frac{\pi}{12})^{2}}{2} \neq 3^{2} etc
    I don't understand this. I would have put 3^{n-1} but i know that is wrong and also not Taylorish
    Series seems OK try recalculating the terms and the derivatives.

    Kalyan.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    iva
    iva is offline
    Member iva's Avatar
    Joined
    Nov 2009
    From
    South Africa
    Posts
    81

    Help working out a Taylor series of cos3x

    Ok but I'm still going wrong, sorry please bear with me:

    For n=1:
     \frac{1}{\sqrt2}.1

    For n=2:

      -\frac{1}{\sqrt2}.{(3x-\frac{\pi}{4})} \neq -\frac{3}{\sqrt2}


    For n=3:

     -\frac{1}{\sqrt2}.\frac{(3x^{2}-\frac{\pi}{2}+\frac{\pi^{2}}{16}) }{2} \neq -\frac{9}{\sqrt2}

    But i can now see that i could get the answer if i take the derivative of what is in brackets to get at least some of what I want eg:

    For n=2 it works out:

      -\frac{1}{\sqrt2}.f'{(3x-\frac{\pi}{4})} = -\frac{3}{\sqrt2}

    But for n=3 it doesn't as I still have the x in my result:
      -\frac{1}{\sqrt2}.f'{(3x-\frac{\pi}{4})} = -\frac{9x}{\sqrt2} \neq -\frac{9}{\sqrt2}

    But besides, why would i differentiate these terms, if indeed this was the way to go about it? From the Taylor polynomial we only differentiate the function part cos3x as we did already, not the \frac{(x-a)^{(n-1)}}{(n-1)!}
    right?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Member kalyanram's Avatar
    Joined
    Jun 2008
    From
    Bangalore, India
    Posts
    143
    Thanks
    14
    I guess you are confused as to how to apply the formula


    Taylor's formula is
    f(x) = f(a) + \frac{x-a}{1!}f^{'}(a) + \frac{(x-a)^2}{2!}f^{"}(a) + ......... + \frac{(x-a)^n}{n!}f^{(n)}(a)
    Now first term is f(a) = cos(\frac{\pi}{4}) = \frac{1}{\sqrt2}
    Second term is \frac{x-a}{1!}f^{'}(a) = \frac{x-a}{1!}(-3.sin(\frac{\pi}{4}) = \frac{x-a}{1!}(-3.\frac{1}{\sqrt2})
    Third term is \frac{(x-a)^2}{2!}f^{"}(a) = \frac{(x-a)^2}{2!}(-3^{2}.cos(\frac{\pi}{4}) = \frac{(x-a)^2}{2!}(-3^2.\frac{1}{\sqrt2})
    Fourth term is \frac{(x-a)^3}{3!}f^{'''}(a) = \frac{(x-a)^3}{3!}(3^{3}.sin(\frac{\pi}{4}) = \frac{(x-a)^3}{3!}(3^{3}.\frac{1}{\sqrt2})
    ....so on....
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Jan 2011
    Posts
    12
    Learn how to find the nth derivatives of trigonometric functions and this will become a LOT easier.
    Follow Math Help Forum on Facebook and Google+

  15. #15
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,786
    Thanks
    1570
    BTW, tell whoever has set this question that this is a stupid question.

    The point of a Taylor series is to use a particular combination of addition, subtraction, multiplication, division and exponentiation to approximate numbers you normally would not be able to evaluate.

    There is no point in centering a Taylor series about \displaystyle \frac{\pi}{12}, because it gives surd coefficients (which you can not easily evaluate) around a point that can not be easily evaluated.
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Trig. Identities (cos3x)
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: April 19th 2010, 02:49 AM
  2. Replies: 0
    Last Post: January 26th 2010, 09:06 AM
  3. Replies: 9
    Last Post: April 3rd 2008, 06:50 PM
  4. sin4x=cos3x
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: February 12th 2008, 11:41 PM
  5. not working out for me! geometric series
    Posted in the Algebra Forum
    Replies: 4
    Last Post: October 23rd 2006, 07:16 PM

Search Tags


/mathhelpforum @mathhelpforum