How to find the intersection points of lines that are normal to two curves?

215 Views Asked by At

Let I have two curves,

\begin{gather} f(x)=\frac{x^3}{4}+1 \\ g(x)=\frac{(x-\tfrac{1}{2})^3}{7}+\tfrac{1}{2} \end{gather}

There are zero or more lines that are normal to both curves. In other words, the point $(x_1,f(x_1))$ and $(x_2,g(x_2))$ must satisfy the following,

$$ f'(x_1) = g'(x_2) =\frac{x_2-x_1}{f(x_1)-g(x_2)} $$

How to locate the collection of $x_1$ and $x_2$ (if any)?

My effort:

F[x_] := x^3/4 + 1;
G[x_] := (x - 1/2)^3/7 + 1/2;
Plot[{F[x], G[x]}, {x, -2, 4}]
Solve[{F'[a] == G'[b], F'[a] == (b - a)/(F[a] - G[b])}, {a, b}] // N
2

There are 2 best solutions below

0
On

You have already written the condition; assuming $a\neq b$ you must have: $$ (f'(a)-g'(b))(f(a)-g(b))+(a-b)=0,$$ that is like saying: $$ 3(a-b)(a+b)(a^2+ab+b^2)+16=0$$ or: $$ 16+3a^4+3a^3b-3ab^3-3b^4 = 0.$$ This quartic curve is a blow-up of the double line $a^2-b^2=0$:

Quartic curve

hence the $(a,b)$-solutions become closer and closer to the line $a=b$ or to the line $a=-b$ as $|a|+|b|$ tends to infinity. The $a=b$ case leads to the condition: $$(f'(x)-g'(x))^2 = 1$$ that is equivalent to $$f'(x)-g'(x)=1$$ since $f'(x)-g'(x)$ is always greater than $-1$. In this last case, the solutions are given by: $$ x = \frac{-2\pm\sqrt{35}}{3}.$$

0
On

Using differential calculus,

f '(x) is the slope of f(x) at x

g'(x) is the slope of g(x) at x

The line normal (tangent) to f(x) at x1 has the equation (in point-slope form):

y - f(x1) = f '(x1)*(x - x1)

The line normal (tangent) to g(x) at x1 has the equation (in point-slope form):

y - g(x1) = g'(x1)*(x - x1)

Subtracting equations will let us solve for x, which is the x coordinate of the intersection point of the two normal lines. Doing so gives:

g(x1) - f(x1) = f '(x1)(x - x1) - g'(x1)(x - x1)

Factoring gives:

g(x1) - f(x1) = (f '(x1) - g'(x1))*(x - x1)

Dividing through by (f'(x0) - g'(x1)) gives:

(g(x1) - f(x1))/(f '(x1) - g'(x1)) = x - x1

Thus:

x = (g(x1) - f(x1))/(f '(x1) - g'(x1)) + x1

To find n intersection points, which correspond to n pairs of straight normal lines, you want to let x1 vary n times from, let's say from -10 to + 10, to get n-many x coordinate points. Then, to compute the y coordinate for each of the n-many x points, you just plug each x coordinate and corresponding x1 value into either one of the two normal-line equations. For example, you could use:

y - f(x1) = f '(x1)*(x - x1)

Of course, you need to solve for y first:

y = f '(x1)*(x - x1) + f(x1)

That is my answer to what I understand as your problem.

I used the following Maxima script to check my work:

    remvalue(x,y);
    f(x):= x^3/4 + 1;
    ff(x):= (3*x^2)/4;
    g(x):= (x - 1/2)^3/7 + 1/2;
    gg(x):= (3*(x-1/2)^2)/7;
    t:4;
    normF(x):= ff(t)*(x - t) + f(t);
    normG(x):= gg(t)*(x - t) + g(t);
    plot2d([f(x),g(x),normF(x),normG(x)], [x,1,5]);
    X: (g(t) - f(t))/(ff(t) - gg(t)) + t;
    Y: ff(t)*(xx - t) + f(t);