# Horizontal tangent to wolfram alpha's heart-shaped graph

Gold Member
On http://mathworld.wolfram.com/HeartCurve.html, the nicest heart-shaped curve is given by
x=16sin3t
y = 13 cos t-5 cos(2t) -2 cos (3t) - cos(4t)
There are evidently two values of t, one in the first, one in the second quadrant, where you can get a horizontal tangent to this shape. Asking Wolfram alpha to solve dy/dt= -13 sin t+10 sin(2t) +6 sin(3t) +4 sin(4t)=0 (because I want dy/dx = (dy/dt)/(dx/dt)=0)), I get
http://www.wolframalpha.com/input/?i=-13*sin+x++10*sin(2x)++6*sin+(3x)+++4*sin(4x)+=0+
and weeding out other inflection points, there appears a graph with a reasonable solution of t= 0.908 for the first quadrant, but
(a) the symmetrical solution of 2π - 0.908 is missing on the graph
(b) in the listing of the numerical solutions, except for t=0, only complex non-real solutions are given. I have two objections to this: one, there are obviously real solutions, since there are the two tangents. Two, usually Wolfram alpha, when there is a nonzero imaginary part to a solution, puts the imaginary part in a different color on the graph, something they did not do here.
Then, worse, when I want the vertical tangents by setting dx/dt=0, I get only the points at n*π/2, which is obviously not right (as a glance of the curve will show).
What am I doing wrong here? thanks in advance
PS Believe it or not, this is not a homework question. (What heartless teacher would give a heart to differentiate?) But if the mentors think that it is too textbooky style, I have no objections to moving it.

Last edited:

BvU
Homework Helper
2019 Award
Nice figure.

I see ##{dy\over dt}=0## for 0.908 and for -0.908. If you continue the root plot beyond ##t=\pi## it will also show 0 at ##2\pi - 0.908## .

And ##{dx\over dt}=0## for ##t = {\pi\over 2}##, when x = 16, as expected.

Alpha comes up with the +/- 0.908 if you click 'more roots' .
Don't know for sure what's with the complex roots.

The root plot is perfect.

Perhaps you want to look at the x(t) and y(t) plots too.

• Gold Member
Thanks for the reply, BvU. First, I apologize for the typo, as I wished to say that I was puzzled by the lack of t= π-0.908 . (I was not wondering about 2π-0.908, aka t=-0.908.) The reason that I expect π-0.908 is that, if you look at the drawing of the heart, and draw a horizontal tangent on top of the heart, it will intersect the left lobe in a symmetric fashion to where it will intersect the right lobe. (0.908 Radians would be t for the right lobe, taking t as the angle.)

The fact that dx/dt=0 gives t∈{0, π/2, π , 3π/2} is not so surprising from the formal mathematics, but from the picture. First, if you draw the two outside vertical tangents on the plot, they clearly do not intersect the x-axis. (It looks more as if t ≈ 2/3 Radian and t≈9/4 Radians, at a rough guess.) Secondly, and here I am on much shakier grounds, it doesn't look as if the curve is differentiable at at π/2 and 3π/2: since this is not a function, in order for it to be differentiable at those points, it would have to be split into two functions, but then those points are endpoints, at which the functions would not be differentiable.

BvU
Homework Helper
2019 Award
It seems you think ##\tan t = {y\over x} ## ?

Vertical tangents DO intersect the x-axis ! at x = +/- 16 !

A horizontal tangent doesn't intersect the left lobe ?

• BvU
Homework Helper
2019 Award
The curve is not a function y = f(x). dy/dx doesn't work in places where dx/dt = 0, such as t ∈ {0, π/2, π , 3π/2}.
But in between those you can consider the sections of the curve as functions.

That would be "dissecting the heart", though !

• Gold Member
Vertical tangents DO intersect the x-axis ! at x = +/- 16 !
Ah, sloppy phrasing on my part. I meant that the vertical tangents do not intersect the heart at y=0 in the plot. No, I do not consider tan t = y/x, but dy/dx.
Yes, of course a horizontal tangent intersects both lobes. That is why, if the right lobe intersects the tangent at 0.908, the left one should do so at its supplement. As far as the differentiability: would you consider the y-axis a vertical tangent? It goes against the grain, but if you consider this the union of two curves (and allow tangents at endpoints), then perhaps....

BvU
Homework Helper
2019 Award
That is why, if the right lobe intersects the tangent at 0.908, the left one should do so at its supplement.
Intersecting is crossing. I think you mean "touches"
And it does touch at its supplement ! Not in terms of ## t_1 + t_2 = \pi## but in terms of atan2(y1, x1) + atan2(y2, x2) = ##\pi## ! (That's why I thought you mixed up t and atan(y/x))

• BvU
Homework Helper
2019 Award
As far as the differentiability: would you consider the y-axis a vertical tangent? It goes against the grain, but if you consider this the union of two curves (and allow tangents at endpoints), then perhaps....
You'd have to look at $$\lim_{h\downarrow 0}\ { y(h)-y(0)\over h }$$ with y expressed as a function of x to get the right-derivative. With h as ##sin^3 t## and y as ##at^2## (I think a = -20.5) that indeed goes to infinity !
(Again: you could look at the x(t) and y(t) plots too )

I leave that exercise at ##t=\pi/2## to you

• Gold Member
Ah, I think we are getting to the crux of my confusion. My idea was that, as I am looking for the tangents to the heart, I am looking for dy/dx=0, which occurs at the same values of t as the ones at which dy/dt = 0 (since, when dx/dt≠0, dy/dx= (dy/dt)/(dx/dt)). I am identifying t with the angle formed between the origin of the x-y coordinate plane and the point (x(t), y(t)) on the graph of the heart, so that I am not sure why I cannot let t=arctan(y/x). This is, you say, wrong. I would be immensely grateful if you could explain why.
For the vertical tangents, instead of looking at dy/dx going to infinity, I was looking at dx/dy =0 (and so dx/dt=0). Is that not valid?

BvU
Homework Helper
2019 Award
This is, you say, wrong. I would be immensely grateful if you could explain why.
As they say: one counter-example is enough: take t = 0 ##\Rightarrow## (x(t), y(t)) = (0, 5), whereas atan2(y,x) = ##\pi/2## !

• Gold Member
Thanks again, BvU, but perhaps I phrased my question poorly. I do not need convincing that what I am doing is wrong. That is clear, not only from your simple example, but also from my more complex one. The question is: why is my reasoning wrong? In other examples I have investigated, one starts off with a polar graph in the form r=r(t), and then converts this into parametric form by setting x = r(t)*cos(t) & y = r(t)*sin(t), and then taking dy/dt=0 for the horizontal, and dx/dt for the vertical tangents. (Calculus, Larson & Edwards, 9th edition,p 735). But in the heart example, x and y are already functions of t, so why can't I just skip directly to taking dy/dt and dx/dt?

Svein
But in the heart example, x and y are already functions of t, so why can't I just skip directly to taking dy/dt and dx/dt?
You can. Just get hold of an introductory text in classic differential geometry.

• Gold Member
OK, lacking access to a decent mathematics library, I have downloaded a copy of Spivak's "Introduction to Differential Geometry", 3rd ed., vol 1, and am looking at pp 36-37. If you have any other recommendation, I would be grateful. Thanks.

pbuk
Gold Member
In other examples I have investigated, one starts off with a polar graph in the form r=r(t), and then converts this into parametric form by setting x = r(t)*cos(t) & y = r(t)*sin(t), and then taking dy/dt=0 for the horizontal, and dx/dt for the vertical tangents. (Calculus, Larson & Edwards, 9th edition,p 735). But in the heart example, x and y are already functions of t, so why can't I just skip directly to taking dy/dt and dx/dt?
Because this parametric curve was not derived from a polar curve r(t). You can easily see this by setting t=0 which in polar form defines the x axis, y=0, and noticing that x=0: if this was a polar curve it would go through the origin.

If you are looking for the extreme points of the curve you don't need to consider tangents or dy/dx, you simply need dy/dt or dx/dt =0 (this will not give you the bottom point which you can find by setting x=0 as above)..

• pbuk
Gold Member
If you are looking for the extreme points of the curve you don't need to consider tangents or dy/dx, you simply need dy/dt or dx/dt =0 (this will not give you the bottom point which you can find by setting x=0 as above)..
Or for the x-extrema you can see by inspection that these are ±16.

• Gold Member
Thanks very much, MrAnchovy. Those were the last details that were stopping me from being satisfied with the solutions: despite finally getting the correct (x,y) values which corresponded to the graph, I was still curious about the reason that t did not correspond to an angle on the graph, and I was wondering about about the extrema, both points answered by MrAnchovy. So, now everything is much more understandable. ( By the way, stop me if I'm wrong, but it seems that BvU's answer to my question about whether the y-axis can be considered a tangent was an affirmative.) Many thanks to BvU, Svein und Mr.Anchovy!

pbuk
Gold Member
Glad to help - but the note that the y-axis is nowhere tangent to the curve - a tangent line has slope equal to the first derivative of the curve and y'(0) is clearly not 0.

• Gold Member
MrAnchovy, as far as I understand, the vertical tangents do not have to have y' =0, but rather dx/dy = ∞ or, equivalently, dx/dt = 0. This is the case for the y-axis at the two points (x,y,t) = (0, 5, 0) and (0, -15,π)

pbuk
Gold Member
I made two mistakes, the first is that a vertical line has dx/dy = 0, not dy/dx = 0, but it is clear what I meant. The second was looking at the plot of the curve and assuming that the gradients either side of the y-axis were clearly finite and this is not necessarily true - you need to look at the limits as BvU stated.

However the mistake that you are making is that whilst it is true that at t=0 dx/dt = 0, dy/dt is also = 0. This means that the result of the expression (dx/dt) / (dy/dt) is undefined. Consider for example the parametric curve y = (sin t) / t, x = t (i.e. y = (sin x) / x); it is well known that at t = 0 this has gradient 1, however dx/dt = 0.

• Gold Member
Oh, thanks, MrAnchovy, I hadn't noticed that about dx/dt at those points. That definitely buries the question about the y-axis. Good counter-example, too. BvU
Homework Helper
2019 Award
If we restrict ourselves to the domain ##\ t \in [0,\pi] \ ## we only have the right half of the figure.
In post #8 I claim that dx/dt goes to zero faster than dy/dt.
So I would consider the y-axis tangent to the curve, albeit at an end point.

How's that ? • pbuk
Gold Member
I'm not sure this would be relevant, but using l'Hôpital's rule, limt→0 (dx/dt)/(dy/dt) would be
24[cos(0)+3cos(3*0)]/[-13cos(0)+20cos(2*0)+18cos(3*0)+16cos(4*0)] = 96/41≠0

pbuk
Gold Member
<blush> I don't know what's wrong with me - I'm going to put it down to too much Christmas good cheer. Clearly if x = t then dx/dt = 1 everywhere, so I don't know why I said it was zero at t =0. Bad example, but the point remains that dx/dt = 0 is not in general a sufficient condition for dx/dy = 0.

BvU
Homework Helper
2019 Award
Are we still considerering
\eqalign {x &=16\sin^3t \\ y &= 13 \cos t-5 \cos(2t) -2 \cos (3t) - \cos(4t)}

pbuk