valentines reflections graphs

Valentine’s Reflections: Mathematical Matters of the Heart

Estimated Read Time: 7 minute(s)
Common Topics: points, inverse, function, pair, intersection

Introduction

Being a somewhat geeky Maths ‘nerd’, I spent days leading up to Valentine’s day trying to find a Maths function appropriate to the day. In the end, I did not find an appropriate single function but (perhaps aptly enough) a pair: function and inverse function. It occurred to me that these provide a good opportunity to illustrate a number of simple mathematical transformations involving reflections in the x-axis, y-axis, and both x-axis and y-axis. Whilst the inverse function itself illustrates reflection in the line y=x.

The Function (and its Inverse)

So here is the pair of graphs I initially settled upon: $$y=-x(x-4)$$ and $$x=-y(y-4).$$ As can be seen, there is some semblance of a heart shape formed by the function and its inverse. Perhaps not quite what Valentine card designers would be looking for!

heart shape formed by the function and its inverse

It intrigued me to note that this particular function and its inverse have 4 points of intersection. Two of these are solvable by simple inspection. For the other pair, since we are dealing with a quadratic and a square root function, we end up needing to solve a polynomial of order 4: $$y=-x(x-4)=y(y-4)(-y(y-4)-4),$$ or $$-y^4+8y^3-20y^2+15y=0$$. Since such a task is well out of my mathematical reach,  I submitted the equations (as a simultaneous pair) to Wolfram Alpha obtaining some interesting solutions:

function and its inverse have 4 points of intersection

It should be clear from the graph that we expect the solutions to be symmetrical about the line y=x so it is interesting that WA presents the y-values in a somewhat complicated form. The y-value of the first solution should correspond (and does as the reader may easily verify) with the x-value of the second and vv.

Reflections

Typical school level operations on functions are reflections in the x-axis (y -> -y) and reflections in the y-axis (x -> -x). For reflection in the x-axis, the corresponding equations (function and inverse) are: $$y=x(x-4)$$ and $$x=y(y-4).$$ For reflection in the y-axis: $$y=-x(x+4)$$ and $$x=-y(y+4).$$ To complete the reflection ‘set’ , we need to reflect in the x-axis and then in the y-axis or vv (both should give the same result): y=x(x+4) and x=y(y+4) respectively. Let us now plot all 4 functions and their inverses using the desmos online graphing tool:

plot all 4 functions and their inverses

As can be seen, we end up with a ‘design’ that has several different lines of symmetry. In addition to those mentioned above, we seem to have somehow ‘inherited”  symmetry about the line y=-x although that was not a specific part of the design process outlined above. The reader may note there are ‘big hearts’ as well as ‘small hearts’ in the graphic. For example, the parabola with a turning point (-2;4) in the second quadrant will show a corresponding inverse function turning point (4;-2) in the fourth quadrant.  Each function/inverse pair has 4 points of intersection, 2 of which lie on the line y=x as is visually apparent. The other pair are obtained through the solution of a polynomial order 4 as we explained and illustrated earlier (the solution set includes the pair on the line y=x leading to 4 points of intersection as we might expect from solving a ‘quartic’ equation).

y = -x(x-1) and Derivatives

This set of functions displays either one or two points of intersection for each function/inverse pair. All of them (as for the -x(x-4) set) have a solution at (0;0) and the second solution(s) (for the parabolas with turning points in quadrants 2 and 4 are at (2;2) and (-2;-2). The parabolas with turning points in quadrants 1 and 3 only intersect their inverse function partners at (0;0).  The graphic displays similar symmetry to the first but (at least to the author’s eye) has a more ‘clean-cut’ appearance on account of there being fewer points of intersection.  A very ‘unromantic’ perception perhaps since there are no hearts in this graphic!

set of functions displays either one or two points of intersection

y=-x(x-3) and Derivatives

In this set of functions, the parabolas with turning points in quadrants 1 and 3 only intersect their inverse functions along the line y=x at points (2;2) and (-2;-2) respectively. As usual, all parabolas/inverses have a point of intersection at the origin. The parabolas with turning points in quadrants 2 and 4 have four points of intersection with their inverses leading to ‘hidden’ heart shapes in the graphic below. Consider for example the parabola with a turning point at (1.5;-2.25) and its inverse with a turning point at (-2.25;1.5). Function meets inverse at (0;0) and (4;4)  forming the heart shape. If the reader traces these curves, it will become apparent that there are two further points of intersection.

parabolas with turning points in quadrants 1 and 3 only intersect their inverse functions

Heart Condition

We may pose the question under what particular circumstances do we get heart-shaped graphics as distinct from others that do not display any such characteristic? Mathematically we are asking when do graphs of the form y=-x(x-k) have 4 points of intersection with their corresponding inverse functions. To answer this question we submit a literal equation to Wolfram Alpha – by way of requesting a solution to the simultaneous pair y=-x(x-k) and x=-y(y-k):

simultaneous pair y=-x(x-k) and x=-y(y-k)

The solution above contains a quadratic in k under the square root sign. Hence we determine where there will be real solutions (apart from x=0 and x=k-1) by solving the inequality: $$k^2-2k-3 \ge 0$$. Happily the quadratic factorises easily as (k-3)(k+1) and so we quickly obtain the solution: $$k \ge 3,$$ or $$k \le{-1}.$$ It should now be apparent why we selected values of k=3 and k=1 for two of our examples above. These are boundary values of the above quadratic.

We need to note here that technically the boundary value is k=-1 corresponding to the equation y=-x(x+1) and its inverse x=-y(y+1).  However, this pair is in the ‘set’ of functions for which the ‘base pair’ are y=-x(x-1) and x=-y(y-1). In this case k=1 so we are in the region where the only points of intersection lie on the line y=x. In fact only at (0;0) since (per general solution above) the other solution at (k-1;k-1) also corresponds to (0;0) given k=1.

Given k=3, two of the “set” will actually have a k-value of -3  and hence fall in the region where we expect 4 points of intersection and heart shapes. As described earlier, these ‘hidden’ hearts can be found in the graphic illustrating k=3 and derivatives.

y=-x(x-0.5) and Derivatives

In this case, the k value is either 1/2 or -1/2 and both are in the region where we do not expect the graphs to intercept their inverses except along the line y=x. In fact, this holds for all fractional values of k – there is nothing particularly unique about k=1/2.

 

graphs to intercept their inverses except along the line y=x

Special Case: k=2 and Derivatives

The graphs of interest here are those of y=-x(x+2) and y=x(x-2)  the turning points of which lie in the second and fourth quadrants respectively. The corresponding inverse functions are x=-y(y+2) and x=y(y-2). The k-value is -2 so we expect 4 points of intersection between function and inverse. Requesting Wolfram Alpha to solve for these points in the case of y=x(x-2) and inverse, we find (remarkably) that the solution pair is none other than the “golden ratio” and its negative reciprocal. We can quickly verify that this pair satisfy both equations by using the unique ‘algebra’ of the golden ratio ##\phi.## Given ##x=\phi:## $$ y=\phi(\phi-2)=\phi(\phi-1-1)=\phi(\phi^{-1}-1)=1-\phi=-\phi^{-1}$$. Similarly given ##y=-\phi^{-1}:## $$x=-\phi^{-1}(-\phi^{-1}-1-1)=\phi^{-1}(\phi^{-1}+1+1)=\phi^{-1}(\phi+1)=1+\phi^{-1}=\phi $$. Another solution pair will be the same except with x and y values swapped since solutions are symmetrical about the line y=x.

y=-x(x+2) and y=x(x-2) 

Summary and Conclusion

In this article, we have examined various sets of functions based around the ‘generic’ function  y=-x(x-k). Whilst the ‘quest’ for heart-shaped graphics might appear a little frivolous, it did give rise to some interesting Maths in respect of determining the points of intersection of parabolas and their inverse functions. We also determined the particular conditions under which the characteristic heart-shaped graphics arise. We hope that at the very least the article provides some good ideas for student exercises involving function reflections and inverses.

Seeing as the article began with a ‘proto-type heart-shaped design, we will end with one which incorporates various aspects of the theory discussed in the article. Namely the set of graphs based around y=-x(x-2). We shall leave the reader to judge whether or not this final graphic will cut any ice with Valentine card designers!

graphs based around y=-x(x-2)

References

[1]Solve for x and y: y=-x(x-4) ; x=-y(y-4) – wolfram|alpha.https://www.wolframalpha.com/input/?i=Solve+for+x+and+y%3A+y%3D-x%28x-4%29+%3B+x%3D-y%28y-4%29.
(Accessed on 02/24/2021).
bib ]
[2]Wolfram Alpha.
Solve for x and y: y=-x(x-k) ; x=-y(y-k) – wolfram|alpha.https://www.wolframalpha.com/input/?i=Solve+for+x+and+y%3A+y%3D-x%28x-k%29+%3B+x%3D-y%28y-k%29.
(Accessed on 02/24/2021).
bib ]
[3]Wikipedia Contributors.
Golden ratio – Wikipedia.
https://en.wikipedia.org/wiki/Golden_ratio.
(Accessed on 02/24/2021).
bib ]
[4]Wolfram Alpha.
Solve for x and y: y=x(x-2) ; x=y(y-2) – wolfram|alpha.https://www.wolframalpha.com/input/?i=Solve+for+x+and+y%3A+y%3Dx%28x-2%29+%3B+x%3Dy%28y-2%29.
(Accessed on 02/24/2021).
bib ]
[5]Desmos.
Valentine graphs with k = 4.
https://www.desmos.com/calculator/dr4tijr2d9.
(Accessed on 02/26/2021).
bib ]
[6]Desmos.
Valentine graphs with k = 1.
https://www.desmos.com/calculator/mrlkqer6zx.
(Accessed on 02/26/2021).
bib ]
[7]Desmos.
Valentine graphs with k = 3.
https://www.desmos.com/calculator/valny6vd4t.
(Accessed on 02/26/2021).
bib ]
[8]Desmos.
Valentine graphs with k = 0.5.
https://www.desmos.com/calculator/j66qnxdyk7.
(Accessed on 02/26/2021).
bib ]
[9]Desmos.
Valentine graphs with k = 2.
https://www.desmos.com/calculator/alxfyzfxka.
(Accessed on 02/26/2021).
bib ]

Comment Thread

 

4 replies
  1. neilparker62 says:

    epenguin said

    It is not beyond your reach when you already know, as you do, two of the solutions!

    Ok – better give it a go then!

    $$y=-x(x-k) ; x=-y(y-k) \implies
    y=y(y-k)(-y(y-k)-k)$$ $$ \implies
    -y=y(y-k)(y(y-k)+k)=(y^2-ky)(y^2-ky+k)$$ $$\implies -y=y^4-ky^3+ky^2-ky^3+ky^2-k^2y$$ $$\implies 0=y^4-2ky^3+2ky^2-(k^2-1)y=y(y-(k-1))(y^2-(k+1)y+(k+1))$$ From which we obtain the two solutions at (0;0) and (0;k-1). The discriminant of the third factor quadratic is $$(k+1)^2-4(k+1)=k^2-2k-3=(k-3)(k+1)$$ in accordance with the WA solution.

  2. neilparker62 says:

    epenguin said

    "needing to solve a polynomial of order 4: y = − x ( x − 4 ) = y ( y − 4 ) ( − y ( y − 4 ) − 4 ) , or − y 4 + 8 y 3 − 20 y 2 + 15 y = 0 . Since such a task is well out of my mathematical reach, "

    It is not beyond your reach when you already know, as you do, two of the solutions!

    True enough – should have seen that one! Perhaps a little bit 'knee jerk' to send it off to WA!

  3. epenguin says:
    "needing to solve a polynomial of order 4: y = − x ( x − 4 ) = y ( y − 4 ) ( − y ( y − 4 ) − 4 ) , or − y 4 + 8 y 3 − 20 y 2 + 15 y = 0 . Since such a task is well out of my mathematical reach, "

    It is not beyond your reach when you already know, as you do, two of the solutions!

  4. neilparker62 says:

    Useful nucleus said

    Please suggest a citation for anyone who wish to use these expressions (e.g. for homework problems…).

    Bibtex Code follows – is that ok ?

    @misc{Valentine Reflections online,
    author = {Neil Parker},
    title = {Valentine's Reflections: Mathematical Matters of the Heart},
    howpublished = {\url{https://www.physicsforums.com/insights/valentines-reflections-mathematical-matters-of-the-heart/}},
    month = {March},
    year = {2021},
    note = {(Accessed on 03/02/2021)}
    }

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply