# What is the plot of this implicit function: $|\sin x|^y+|\cos x|^y = 1$

I'm trying to manually plot the following function: $$|\sin x|^y+|\cos x|^y = 1$$ My basic approach for implicit functions is to try to express $y$ in terms of $x$ and plot it, or $x$ in terms of $y$ and then plot the inverse. Sometimes it's clear from the first glance if the equations is in some special form (for example a circumference).

For the above I couldn't find an explicit expression. I've tried to manipulate the expression in different ways in order to take logarithms and get rid of the $y$ power. It's even harder to get an insight since neither W|A nor desmos is able to plot it.

Below is the output from Mathematica which I don't really understand:

I'm interested in the ways I could transform the equation above so that it's easier to see what the graph looks like.

upd:

As pointed in the comments the above graph shows various contours. Below is the one which reflects the initial function:

Here is a Mathematica snippet for copy and paste:

ContourPlot[Abs[Cos[x]]^y + Abs[Sin[x]]^y == 1, {x, -1, 1}, {y, -1, 10}]


Just to be complete I'm adding the final plot from Mathematica (with some discrepancies which I assume are caused by the way Mathematica calculates the values) which reflects the answer by Michael Seifert.

• Off-topic here, but to get the contour you're asking for in Mathematica, you need to have Abs[Cos[x]]^y + Abs[Sin[x]]^y - 1 == 0 (note the double equals sign.) As it is, Mathematica is plotting several contours of the function $f(x,y) = |\sin x|^y+|\cos x|^y - 1$, for various values of the contour. Aug 1, 2018 at 14:10
• @MichaelSeifert Good point, didn't know that. I will update the OP with a new image Aug 1, 2018 at 14:14
• Also, you may need to zoom out a bit. I believe that no point of the contour lies in the range $-1<x<1$ and $-1<y<1$. Aug 1, 2018 at 14:15
• @MichaelSeifert You are right no contour is indeed present in the range you pointed Aug 1, 2018 at 14:24

We can see an obvious solution for the contour: if $y = 2$, we have $|\cos x|^2 + |\sin x|^2 = 1$, which is satisfied for all values of $x$. So the line $y = 2$ is part of the solution set.
If $y > 2$, then since $0\leq |\cos x| \leq 1$, we have $|\cos x|^y \leq |\cos x|^2$, with equality iff $|\cos x| = 0$ or $|\cos x| = 1$. A similar relation holds for $|\sin x|$. Thus, $$|\cos x|^y + |\sin x|^y \leq |\cos x|^2 + |\sin x|^2 = 1.$$ Since equality only holds if both $|\cos x|$ and $|\sin x|$ are either 0 or 1, we cannot have $|\cos x|^y + |\sin x|^y = 1$ unless this is so. This occurs when $x = n \pi/2$ for some integer $n$.
A similar argument can be made for when $y < 2$; in this case, we have $|\cos x|^y \geq |\cos x|^2$ and similarly for $|\sin x|$. Thus, $x = n \pi/2$ is a solution when $y < 2$ as well. The only exception is that $0^0$ is indeterminate, so we cannot say that the points $x = n \pi/2$, $y = 0$ are part of the contour.
Thus, the solution to the problem is the union of the sets $\{y = 2 \}$ and $\{x = n\pi/2, y \neq 0\}$ for $n \in \mathbb{Z}$.
• You'll notice that the results from Mathematica aren't entirely accurate, since they miss the curves $\{x = n \pi/2, y \neq 0\}$ for $n \neq 0$. If you're curious as to why this is, feel free to post a question over at Mathematica.SE. Aug 1, 2018 at 14:38
• Now I see. I've just tried to play with $x$ and $y$ ranges after which your solutions absolutely makes sense, added the image to the OP. Thank you! Aug 1, 2018 at 14:49