1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Horizontal tangent to wolfram alpha's heart-shaped graph

  1. Dec 30, 2015 #1
    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: Dec 30, 2015
  2. jcsd
  3. Dec 30, 2015 #2

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  4. Dec 30, 2015 #3
    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.
     
  5. Dec 30, 2015 #4

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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 ?
     
  6. Dec 30, 2015 #5

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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:

    !
     
  7. Dec 30, 2015 #6
    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....
     
  8. Dec 30, 2015 #7

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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))
     
  9. Dec 30, 2015 #8

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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
     
  10. Dec 30, 2015 #9
    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?
     
  11. Dec 30, 2015 #10

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    As they say: one counter-example is enough: take t = 0 ##\Rightarrow## (x(t), y(t)) = (0, 5), whereas atan2(y,x) = ##\pi/2## !
     
  12. Dec 30, 2015 #11
    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?
     
  13. Dec 31, 2015 #12

    Svein

    User Avatar
    Science Advisor

    You can. Just get hold of an introductory text in classic differential geometry.
     
  14. Dec 31, 2015 #13
    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.
     
  15. Dec 31, 2015 #14
    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)..
     
  16. Dec 31, 2015 #15
    Or for the x-extrema you can see by inspection that these are ±16.
     
  17. Dec 31, 2015 #16
    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!
     
  18. Jan 2, 2016 #17
    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.
     
  19. Jan 2, 2016 #18
    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,π)
     
  20. Jan 3, 2016 #19
    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.
     
  21. Jan 3, 2016 #20
    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:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Horizontal tangent to wolfram alpha's heart-shaped graph
Loading...