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!

Question about deriving Maclaurin Series

  1. Jun 2, 2015 #1
    1. The problem statement, all variables and given/known data
    As I've been going through examples in my textbook they are becoming increasingly lengthy to compute and thus I have resorted to using software to complete the task. For example when computing the series for ##\sin{(\ln{(1+x)})}## $$\ln{(1+x)}=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+... \\ \sin{x}=x-\frac{x^3}{3!}+\frac{x^5}{5!}+... \\
    \sin{(\ln{(1+x)})}=\sin{(x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4})}\\
    =(x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4})-\frac{(x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4})^3}{3!}+\frac{(x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4})^5}{5!}
    $$

    2. Relevant equations
    3. The attempt at a solution

    This would take a ridiculously long time to calculate by hand (for me at least) and I was just curious as to whether or not it's normal to encounter difficult expressions to evaluate by hand when finding Maclaurin series.
     
  2. jcsd
  3. Jun 2, 2015 #2

    MarcusAgrippa

    User Avatar
    Gold Member

    The reason for setting problems like this is to familiarise you with the math and to help you to develop skill in computation. To use software at this stage of the game is counterproductive.

    In your problem, you should have recognised that you need to find the series for sin x and the series for ln(1+x), and that you can get the final series by substituting one into the other, as was done above. No software is necessary for this. You have however missed a step: the final series should have the form [itex] a_0 + a_1 x + a_2 x^2 + \cdots [/itex].

    In a test or exam, you would be required (unless stated otherwise) to derive the series for sin x and for ln(1+x).

    The object of these exercises is 1. to develop skills, thinking and calculational; 2. to impress the theory into your mind by means of concrete examples; 3. to add to your repertoire of basic information that any professional must have if he is to practice his profession. In this case, you should make a point of memorising the power series for sin x and ln(1+x), and for other elementary functions. These basic series will allow you to calculate the series for more complicated examples.

    Do not use software for solving your homework problems. It defeats the object of the exercise and is counter productive.
     
  4. Jun 2, 2015 #3
    I probably should have worded my question differently, I am doing everything in the problem up until the last part I left up there, at that stage I am then plugging it into the software to expand the function.
     
  5. Jun 2, 2015 #4

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It shouldn't take very long to expand the series by hand up to terms in ##x^4## or ##x^5##.
     
  6. Jun 2, 2015 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    In this case, the direct approach is easier than you may imagine. Let ##f(x) = \sin(\ln(x+1))## and ##g(x) = \cos(\ln(x+1))##. Then we have
    [tex] f'(x) = \frac{g(x)}{x+1}\\
    f''(x) = \frac{-f(x)-g(x)}{(x+1)^2} \\
    f'''(x) = \frac{g(x) + 3 f(x)}{(x+1)^3}\\
    f^{(4)}(x) = \frac{-10 f(x)}{(x+1)^4} \\
    \vdots
    [/tex]
    and so forth. So, getting a general formula for the ##n##th derivative ##f^{(n)}(x)## should not be too hard. From that you can quite easily get the Maclaurin series
    [tex] f(0) + f'(0) x + \frac{1}{2!} f''(0) x^2 + \frac{1}{3!} f'''(0) x^3 + \cdots \\
    [/tex]
     
  7. Jun 2, 2015 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You're probably thinking of truncating the series for log after a few terms, multiplying everything out, and then adding them together, right? If you did that, it would be quite tedious and long. Instead, calculate each term one by one, identifying where all the different contributions come from. For example, consider the ##x^4## term. The third term in the expansion of sin (log series) is
    $$ \frac{1}{5!} \left(x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots \right)^5 = \frac{x^5}{5!} \left(1 - \frac{x}{2} + \frac{x^2}{3} -\frac{x^3}{4} + \cdots\right)^5.$$ From this, you can see that this term will contribute only terms of ##x^5## and higher, so for the ##x^4## term, we can ignore it.

    The second term is
    $$-\frac{x^3}{3!} \left(1 - \frac{x}{2} + \frac{x^2}{3} -\frac{x^3}{4} + \cdots\right)^3,$$ so it will contribute terms of order ##x^3## and higher. For the ##x^4## term specifically, it comes from the product of ##x^3## and the linear term in the expansion of ##(1-x/2+x^2/3-\cdots)^3##, which you can determine using the binomial expansion. The contribution to the ##x^4## term is therefore ##-\frac{1}{3!} x^3 \times (-\frac 32 x) = \frac 14 x^4##. When you combine this result with the ##x^4## term from the first term in the sin expansion, you see the ##x^4## term vanishes.

    It gets more complicated as you go to higher-order terms, but to figure out the first few terms of the expansion, it's not too bad.
     
  8. Jun 2, 2015 #7
    If we are only getting terms with a degree less than or equal to 5 isn't it easier to quickly derive $$(ax+bx^2+cx^3+dx^4)^3=(3(a^2c+ab^2))x^5+(3a^2b)x^4+a^3x^3$$ which gives all the terms with a degree of 5 or less.
     
  9. Jun 2, 2015 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Try it and find out. As Marcus says above, one of the reasons for this type of problem is to develop your skills in doing these types of calculations.
     
  10. Jun 2, 2015 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    It would be quicker to use the method in Post #5. With ##f(x) = \sin(\ln(x+1))## and ##g(x) = \cos(\ln(x+1))## we have the ##n##th derivative of ##f## as
    [tex] f^{(n)}(x) = \frac{A_n f(x) + B_n g(x)}{(x+1)^n}, [/tex]
    where ##A_n, B_n## are constants and ##A_1 = 0, B_1 = 1##. It follows easily that the ##A, B## obey a simple recursion scheme:
    [tex] A_{n+1} = -n A_n - B_n, \; \; B_{n+1} = A_n - n B_n [/tex]
    Using this, we can easily and quickly get ##f^{(n)}(0) = B_n## for ##n## up to 10 or more with little effort (although the magnitudes of ##A,B## grow large quickly as ##n## increases, so a calculator becomes a necessity). You can keep the numerical growth under control by looking instead at ##\alpha_n = A_n / n!## and ##\beta_n = B_n / n!##. These satisfy
    [tex] \alpha_{n+1} = -\frac{n}{n+1} \alpha_n - \frac{1}{n+1} \beta_n, \;\;
    \beta_{n+1} = \frac{1}{n+1} \alpha_n - \frac{n}{n+1} \beta_n, [/tex]
    with ##\alpha_1 = 0, \beta_1 = 1##. The quantity ##\beta_n## is the coefficient of ##x^n## in the Maclaurin expansion of ##f##. Thus, getting directly the first 10 or so terms of the Maclaurin expansion is relatively straightforward.
     
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: Question about deriving Maclaurin Series
Loading...