# Modify tan(x) function to be sharper

On the right is -tan(x) + Pi/2 function. On the left is a function i am trying to create which is a "sharper" version of the function on the right.

Any idea how to get the left function ? It doesn't have to be a modified version of tan but i think it is easier this way, i could be wrong.

• Do you want your function to pass through $(-1, \pi)$? Mar 1, 2015 at 15:54
• @Regret yes, i especially do Mar 1, 2015 at 15:55
• Maybe $\pi/2-\tan(x^3)$
– user147263
Mar 1, 2015 at 15:56
• @Regret i edited my question it is -tan(x) + Pi/2, and i need it to pass from those 3 points i showed (−1,pi), (0,pi/2), (1,0) Mar 1, 2015 at 15:56
• How comes that $-\tan(1)+\frac{\pi}{2}=0$? (I am referring to the first graphics that seems to pass through $(1,0)$). Mar 1, 2015 at 15:58

This function should go through the points $(-1,\pi), (0, \frac\pi2), (1,0)$. It is quite easy to see why. It is also just $\tan$ scaled and translated, so the general shape is the same.

$$f(x)=(\tan(1)-\tan(x))\frac{\pi}{2\tan(1)}$$

By the way, your first function is $y = \tan \left(-x\right)+\frac{\pi }{2}$

Try $y=\frac12\tan(-x)+\frac\pi2$

The "amplitude" is less so it will "grow" slower. Very precise terminology :D

• i need my function to pass from the points i showed Mar 1, 2015 at 15:55
• Ok. Make the period slightly less. Solving the equation for its zeros you can find that $\tan(-x) = -\pi$. So, $x = \arctan(\pi)$. The function crosses the x-axis at $\arctan(\pi)$, but you want it to cross at 1, so you can change the period so it is shorter. Mar 1, 2015 at 16:01
• So the equation becomes $y=\frac{1}{2}\tan \left(-\arctan \left(\pi \right)x\right)+\frac{\pi }{2}$ Mar 1, 2015 at 16:03
• @dardeshna: $+1$ for having a function scaled horizontally rather than vertically that still goes through the same (important) points! Mar 1, 2015 at 16:43