# Maxwell-Area Construction Problem

I am solving a problem which asks to find the equation of a horizontal line which crosses the graph of $$y=x^3-3x+1$$ at three distinct points, such that the two areas bounded by such curves are equal.

I am creating a program for this problem. What I did is to solve for the roots or the points of intersection of the 2 curves (say $a,b,c$) analytically. Suppose the horizontal line takes the form $y=y_p$. The roots are functions of $y_p$ only. Then I used composite Simpson's 3/8 rule to compute for the areas which should be numerically equal. I got $y=1$ as the final answer.

My problem is, as an alternative since analytical formulas for cubic equations is very tedious to code, is it possible to solve for the roots by Newton's method even if $y_p$ is still unknown?

• The question as written is not entirely clear to me: For each $y_p$ one can solve numerically for the intersection points. Do you want a general numerical formula that gives approximations for the $x$-coordinates of the intersection points as a function of $y_p$? (Maybe produced in particular with Newton's formula?) If so, one certainly could not do this for all starting cubic functions simultaneously. – Travis Oct 14 '15 at 9:02
• Anyway, I've written an answer that describes how to find the line analytically by appealing to the symmetry of cubic functions, which for the particular cubic function in the question one can readily do in one's head. – Travis Oct 14 '15 at 9:03

Hint The graph of any cubic function $$f(x) := A x^3 + B x^2 + C x + D ,$$ $a \neq 0$, is symmetric about its unique inflection point: We can show this by solving $f''(x) = 0$ to show that the unique inflection point is $(s, f(s))$, where $s := -\frac{B}{3 A}$, and then showing that $x \mapsto f(x - s) - f(s)$ is an odd function.

Additional hint So, by symmetry, the horizontal line must pass through the inflection point, and hence it is the equation with $y = f(s)$.

Note that simply by appealing to symmetry we can avoid actually computing the intersection points or the areas of the bounded regions, which like the question indicates, is awfully unpleasant, on account of the difficult of extracting roots of general cubics.

• That would be another approach Sir. But is it really possible to solve for the roots using Newton's method? – James Oct 14 '15 at 9:01
• @James I just finished a comment in reply to the original question. I think it ought to be possible to find a numerical approximation for a function that gives the data as a function of $y_p$, e.g., a fixed starting cubic function, but the explicit formula for such a formula using Newton's method would be ugly at best. – Travis Oct 14 '15 at 9:06
• yeah I agree. Using Newton's method is just too cumbersome. Using symmetry simplifies the computation indeed. thanks a lot Sir – James Oct 14 '15 at 9:10
• You're welcome. I'm sorry I couldn't help you more substantially with your numerical question. Finding the roots of a cubic is a sufficiently standard problem that very likely robust numerical algorithms have been developed. – Travis Oct 14 '15 at 9:13

HINT:

Advantage of differentiation is obvious. The derivative has roots $x = \pm 1$ for extremal points. It appears the arbitrary constant in $y = x^3 - 3 x + C$ is much easier to handle, where the cubic is displaced arbitrarily parallel to $y-$axis.

the symmetric of function about original is there in all terms of equation except the $1$, so if we down the equation by one, the function will become symmetric. $$y=x^3-3x$$

now we can conclude the $y=1$ is the equation of horizontal line