Secrets of the Mathematical Ninja: Taylor series and the product rule

$f(x)$, it turned out, was $x^2 \tan(x)$.

"That's going to be a pain to differentiate," said the student, sighing. Taylor series were not his favourite; differentiating trig functions just made matters worse.

"I have a trick," said the Mathematical Ninja.

"Will it save me a lot of work?"

"It will."

"Will it make Taylor series easy?"

"It will."

"Will it guarantee me an A?"

"It won't. But two out of three is pretty good."

"It is. OK, then, ninja, bring it."

The Mathematical Ninja glowered a little; he had tried to insist on being called 'sensei' in the past, but that had lasted only minutes. "Here's the trick."

"I'm listening."

"Don't differentiate $x^2 \tan(x)$. Differentiate $uv$."

"That's just product rule - you get $u^{\prime}v + v^{\prime}u$."

"Yup. Then differentiate that."

"Oh. Crikey. $u^{\prime\prime}v + u^{\prime}v^{\prime}$ for the first one, and $u^{\prime}v^{\prime} + uv^{\prime\prime}$ for the second - but you can join the middle two up, it's $u^{\prime\prime}v + 2u^{\prime}v^{\prime} + uv^{\prime\prime}$."

"Remind you of anything?"

"A bit Pascally, isn't it?"

"Try the next one."

"$u^{\prime\prime\prime}v + 3u^{\prime\prime}v + 3u^{\prime}v^{\prime\prime} + uv^{\prime\prime\prime}$. It works!"

"Well, you haven't proved that. I'll leave that as your homework."

"Thanks. I'm not quite clear how this saves me time, though."

"Ah! It saves you time because you can just work out the $u$ derivates and $v$ derivatives and multiply them together as needed."

"Oh! That's neat. $u^{\prime}$ is $2x$, $u^{\prime\prime} = 2$ and all of the further ones are 0. As for $v$, that's $v^{\prime} = \sec^2(x)$, $v^{\prime\prime} = 2 \sec^2(x) \tan(x)$… then you need product rule again."


"$v^{\prime \prime \prime} = 2 \sec^4(x) + 4 \sec^2(x)\tan^2(x)$. Yuk."

"Although you can turn the $\tan^2(x)$ into $\sec^2(x) - 1$ to make it easier."

"Luckily I'm only doing it to three terms, eh?"

The Mathematical Ninja looked at the sword stashed in the corner of the classroom. He weighed up the benefits and costs, and decided the paperwork probably wouldn't be worth it.


Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.


10 comments on “Secrets of the Mathematical Ninja: Taylor series and the product rule

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter