Horizontal tangent to wolfram alpha's heart-shaped graph

  • Thread starter nomadreid
  • Start date
  • #1
nomadreid
Gold Member
1,460
147
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:

Answers and Replies

  • #2
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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.
 
  • Like
Likes nomadreid
  • #3
nomadreid
Gold Member
1,460
147
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.
 
  • #4
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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 ?
 
  • Like
Likes nomadreid
  • #5
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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 :frown:

!
 
  • Like
Likes nomadreid
  • #6
nomadreid
Gold Member
1,460
147
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.
wolfram's heart.PNG

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.
wolfram's heart2.PNG

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....
 
  • #7
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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))
 
  • Like
Likes nomadreid
  • #8
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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
 
  • Like
Likes nomadreid
  • #9
nomadreid
Gold Member
1,460
147
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?
 
  • #10
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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## !
 
  • Like
Likes nomadreid
  • #11
nomadreid
Gold Member
1,460
147
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?
 
  • #12
Svein
Science Advisor
Insights Author
2,109
677
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.
 
  • Like
Likes nomadreid
  • #13
nomadreid
Gold Member
1,460
147
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.
 
  • #14
pbuk
Science Advisor
Gold Member
1,677
580
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)..
 
  • Like
Likes nomadreid
  • #15
pbuk
Science Advisor
Gold Member
1,677
580
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.
 
  • Like
Likes nomadreid
  • #16
nomadreid
Gold Member
1,460
147
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!
 
  • #17
pbuk
Science Advisor
Gold Member
1,677
580
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.
 
  • Like
Likes nomadreid
  • #18
nomadreid
Gold Member
1,460
147
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,π)
 
  • #19
pbuk
Science Advisor
Gold Member
1,677
580
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.
 
  • Like
Likes nomadreid
  • #20
nomadreid
Gold Member
1,460
147
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. :smile:
 
  • #21
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
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 ?
:rolleyes:
 
  • Like
Likes pbuk
  • #22
nomadreid
Gold Member
1,460
147
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
 
  • #23
pbuk
Science Advisor
Gold Member
1,677
580
<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.
 
  • #24
BvU
Science Advisor
Homework Helper
2019 Award
13,600
3,286
Are we still considerering
$$\eqalign {x &=16\sin^3t \\
y &= 13 \cos t-5 \cos(2t) -2 \cos (3t) - \cos(4t)}$$
 
  • #25
pbuk
Science Advisor
Gold Member
1,677
580
Are we still considering..
I was trying to generalise. I believe that the original parametric curve does have vertical gradient at t = 0 as you suggest, but I suspect that it is non-vertical at t = π/2.
 

Related Threads on Horizontal tangent to wolfram alpha's heart-shaped graph

  • Last Post
Replies
2
Views
659
  • Last Post
Replies
10
Views
2K
Replies
5
Views
609
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
1
Views
1K
Replies
2
Views
2K
Replies
15
Views
2K
  • Last Post
Replies
8
Views
6K
Replies
4
Views
934
Top