Anyone know function that is like Sin or Cos but with pointy tip?

229 Views Asked by At

Basically like what the title saying, anyone know function that is like Sin or Cos but with pointy tip?
image of function that I want to achieve

Edit: There seems to be misunderstanding, since I can't draw it well on the image. I don't want it to be striped, but I want them to be connected line like Sin and Cos the only difference is just that the tip is pointy.
better image for the function

1

There are 1 best solutions below

0
On

Here is something from my initial idea based on $|\tan(x)|$ which presents the correct pointy shape.

enter image description here

Then I make the peaks alternated in sign by multiplying by a square signal $h$ (in blue)

$h(x)=\operatorname{sign}(\{\frac x2-\frac 14\}-\frac 12)\ $ and we graph $\ h(x)|\tan(\pi x)|$.

enter image description here

Then we need to offset the peaks vertically, this is simply done by adding an adjustable constant $b$

$f(x)=|\tan(\pi x)|-b\ $ and we graph $\ h(x)f(x)$.

enter image description here

But as you can notice there is quite a gap between the peaks. Note that since it is a function it CANNOT have a touching point, but we can make the curves close enough by deforming the shape.

We need to enlarge the stripes, this can be done by rasing to a power $n<1$, but if we are not careful, the shape will look like more a bracket $\Large{\{}$ than what we want.

For instance with $f(x)=|\tan(\pi x)|^n-b$ we get for $n=0.3$ :

enter image description here

To remedy to this we want to raise to a power $q(x)$ which is close to $1$ around $0$ and smaller when get away from $0$. I tried different things and came up with $e^{-nx^2}$.

I need of course to make it periodic so in the end it is:

$p(x)=\{x-\frac 12\}-\frac 12\ $ and $\ q(x)=e^{-np(x)^2}$

And we graph for $f(x)=|\tan(\pi x)|^{q(x)}-b$

enter image description here

I think it is quite close to what you required, here is the Desmos page to play with the coefficients:

https://www.desmos.com/calculator/y45pfma75v