0
$\begingroup$

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.

1

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.

$\endgroup$
8
  • $\begingroup$ Do you want your function to pass through $(-1, \pi)$? $\endgroup$
    – Regret
    Mar 1, 2015 at 15:54
  • $\begingroup$ @Regret yes, i especially do $\endgroup$
    – dimitris93
    Mar 1, 2015 at 15:55
  • 1
    $\begingroup$ Maybe $\pi/2-\tan(x^3)$ $\endgroup$
    – user147263
    Mar 1, 2015 at 15:56
  • $\begingroup$ @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) $\endgroup$
    – dimitris93
    Mar 1, 2015 at 15:56
  • $\begingroup$ How comes that $-\tan(1)+\frac{\pi}{2}=0$? (I am referring to the first graphics that seems to pass through $(1,0)$). $\endgroup$ Mar 1, 2015 at 15:58

2 Answers 2

1
$\begingroup$

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)}$$

$\endgroup$
1
$\begingroup$

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

$\endgroup$
4
  • $\begingroup$ i need my function to pass from the points i showed $\endgroup$
    – dimitris93
    Mar 1, 2015 at 15:55
  • $\begingroup$ 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. $\endgroup$
    – dardeshna
    Mar 1, 2015 at 16:01
  • $\begingroup$ So the equation becomes $y=\frac{1}{2}\tan \left(-\arctan \left(\pi \right)x\right)+\frac{\pi }{2}$ $\endgroup$
    – dardeshna
    Mar 1, 2015 at 16:03
  • $\begingroup$ @dardeshna: $+1$ for having a function scaled horizontally rather than vertically that still goes through the same (important) points! $\endgroup$
    – Regret
    Mar 1, 2015 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .