# MacLaurin of the Third-degree in sin(a*x)*cos(b*x) at given values

Alright so from my understanding MacLaurin is a special case of Taylor Series but at f(0). However my question involves solving the third degree of MacLaurin for

$$f(x) = sin(a \times x)\times cos(b\times x)$$

at some given values

$b=5$

$a=18$

$x=0.4$

First I calculated the first derivative

$$f'(x)=[a\times cos(ax) \times cos(bx)] - [b\times sin(ax)\times sin(bx)]$$

Second derivative

$$f''(x) = [-(a^2+b^2) \times sin(ax)\times cos(bx)] - [2 a b \times cos(ax) \times sin(bx)]$$

Third derivative

$$f'''(x) = [b(3a^2+b^2)\times sin(ax) \times sin(bx)] - [a(a^2+3b^2)\times cos(ax)\times cos(bx)]$$

MacLaurin third degree

$$f(0) = f(0) + f'(0)*(x) + f''(0)*(x)^2/2! + f'''(0) * (x)^3 / 3!$$

Okay so now to the problem, this up here should be of MacLaurin third degree, but I still got a x to use from the assignment, so I'm not sure if I should use that x from the start since it's actually defined as $f(x)$, it feels like I've tried everything but it just wont calculate correctly.

Numbers have been switched from the ones used in the assignment, I don't want just an answer, I want to learn how to do this.

• From your derivatives (which I didn't check), $f(0)=0,f'(0)=a,f''(0)=0,f'''(0)=-a(a^2+3b^2)$. So $f(x)\approx ax-a(a^2+3b^2)x^3/3!$ – Yves Daoust Oct 14 '14 at 13:56
• @YvesDaoust Wow, I had forgotten to multiply a with x, didn't realise that until now, thank you. Now it works! That's a days work wasted on something small again. – user184106 Oct 14 '14 at 14:29

Why not to start with simple Taylor expansions such as $$\sin(y)=\sin (y_0)+(y-y_0) \cos (y_0)-\frac{1}{2} (y-y_0)^2 \sin (y_0)-\frac{1}{6} (y-y_0)^3 \cos (y_0)+O\left((y-y_0)^4\right)$$ $$\cos(y)=\cos (y_0)-(y-y_0) \sin (y_0)-\frac{1}{2} (y-y_0)^2 \cos (y_0)+\frac{1}{6} (y-y_0)^3 \sin (y_0)+O\left((y-y_0)^4\right)$$ From there, you can get $\sin(ax)$ and $\cos(bx)$ and make the product of the series.