Ask Uncle Colin: Meeting Graphs

Dear Uncle Colin,

I’m told that the graphs of the functions $f(x) = x^3 + (a+b)x^2 + 3x -4$ and $g(x) = (x-3)^3 + 1$ touch - and I need to express $a$ in terms of $b$. Can you help?

- Can’t Understand Basic Introductory Calculus

Hi, CUBIC, and thanks for your message!

I can see two ways to do this. The calculus-heavy way: if we’re told the two graphs touch, we know that there is a value of $x$ such that,

  • $f(x) - g(x) = 0$; and
  • $f’(x) - g’(x) = 0$

We’re not actually interested in the value of $x$, but in the relationship between $a$ and $b$ - so we have enough equations. I’m going to call $S=a+b$, for simplicity. Let’s figure them out.

The graphs meet!

$f(x) - g(x) = \left[ x^3 + Sx^2 + 3x - 4 \right] - \left[x^3 - 9x^2 + 27x - 26 \right]$

$\dots = (S+9)x^2 - 24x + 22 = 0$

We could try completing the square on that, but let’s get the other equation too.

The graphs go the same way!

$f’(x) - g’(x) = \left[3x^2 + 2Sx + 3\right] - \left[3x^2 - 9x + 27\right]$

$\dots = 2(S+9)x - 24$.

So, given that that equals zero, we find that $(S+9)x = 12$ - and we have a $(S+9)x$ in the first equation that we can replace!

Putting them together

We have $(12x) - 24x + 22 = 0$, or $x = \frac{11}{6}$.

Since $(S+9)x = 12$, we get $S+9 = \frac{72}{11}$, which leads to $S = -\frac{27}{11}$

Then we need to bring $a$ and $b$ back in: $a+b = -\frac{27}{11}$, so $a = -b - \frac{27}{11}$.

A second way

The difference between the cubics is a quadratic - we already found that, it’s $f(x)-g(x) = (S+9)x^2 - 24x + 22$.

For the graphs to touch, that needs to have a double root - which is to say, $24^2 - 4\times(S+9)\times 22 = 0$.

Dividing it all by 4 and rearranging gives $144 = 22(S+9)$, or $22S = -54$ and $S = -\frac{27}{11}$ as before.

Hope that helps!

- Uncle 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.


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