$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."

"Yup."

"$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

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.

## Nathan Briggs

I’m going to pretend I understand Taylor series

## Colin Beveridge

Oh, maybe I should write a post about them? They’re quite neat.

## Colin Beveridge

(Not discovered by Taylor, by the way. Taylor discovered Maclaurin series. Euler discovered Taylor series.)

## Nathan Briggs

Please! I know they’re important, but either I don’t remember or never studied properly the right area of maths to know WHY

## Nathan Briggs

Nathan Briggs liked this on Facebook.

## Colin Beveridge

*Jots down idea* 🙂 Do send requests, I’m always looking for things people want to read.

## Nathan Briggs

A proof of Riemann would be interesting 🙂

## Colin Beveridge

:p

## MathbloggingAll

Secrets of the Mathematical Ninja: Taylor series and the product rule http://t.co/vRuJH1nK5Z

## TraineeGeek

@icecolbeveridge just loved that! +1