I would like to know what the graph of $\tan(f(x))=\frac{x}{1-x^2}$ given that $f(0)=\pi$ looks like.

My attemt

$\tan(f(x))=\tan(f(x)+k\pi)$ for some intiger $k$. It follows that $f(x)=\arctan{\frac{x}{1-x^2}}-k\pi$ . Using the initial condition we find$k=-1$ and thus $f(x)=\arctan{\frac{x}{1-x^2}}+\pi$ when I graphed this and checked with desmos this does not look like $\tan(f(x))=\tan(f(x)+k\pi)$ as the limits for $x\to \infty$ differ. In my case as $x\to\infty$, $f(x)$ tends to $\pi$ but in the solution it tends to $2\pi$.

My Graph

enter image description here

Answer graph

enter image description here

Could someone explain to me what I have done wrong?

Edit I should add that we were told that we may assume that $f(x)$ is continues at +/- 1. Maybe this was they way of telling is that we need to make it look continius?

  • 1
    $\begingroup$ All the equations here contain only one variable, hence cannot be drawn in the plane. Did you mean to set $f(x)=y$? $\endgroup$
    – Allawonder
    May 14, 2020 at 16:09
  • $\begingroup$ i believe that is what was meant here $\endgroup$ May 14, 2020 at 16:11
  • $\begingroup$ @Allawonder yes sorry, in the question we were told to graph $y=h(x)$ and in writing this on stack exchange I used $f(x)$ instead. In essence, I want to find the graph of $y=f(x)$. Sorry for the confusion, let me know if that makes it clearer $\endgroup$ May 14, 2020 at 16:14
  • $\begingroup$ @MathsWizzard So you want to draw the curve $$\tan y=\frac{x}{1-x^2}$$? $\endgroup$
    – Allawonder
    May 14, 2020 at 16:20
  • $\begingroup$ @Allawonder yes given that $y=\pi$ at $x=0$ $\endgroup$ May 14, 2020 at 16:20

1 Answer 1


It is true, that for any $x\in \mathbb{R}\setminus \{-1,1\}$ there must exist a $k\in \mathbb{Z}$, such that $f(x) = \arctan(\frac{x}{1-x^2})+k\pi$, but we cannot simply assume that the same $k$ holds for all $x$.

If we have further information, such as the information that $f$ is continuous on $(-\infty, -1)\cup (-1,1)\cup (1,\infty)$, then we must have a fixed constant on each interval, meaning that $$f(x) = \begin{cases} \arctan(\frac{x}{1-x^2}) + k_1\pi &,\text{for } x\in (-\infty,-1) \\ \arctan(\frac{x}{1-x^2}) + k_2\pi &,\text{for } x\in (-1,1) \\ \arctan(\frac{x}{1-x^2}) + k_3\pi &,\text{for } x\in (1,\infty) \end{cases}$$ And as you have already mentioned the initial condition $f(0)=\pi$ implies that $k_2=1$.

Now if we want to extend $f$ to a function on the entire real line in a way, such that it is continuous, then we must have $$f(-1) = \lim_{x\:\uparrow \: -1}\arctan(\frac{x}{1-x^2}) +k_1 \pi = \lim_{x\:\downarrow \:-1} \arctan(\frac{x}{1-x^2}) + \pi$$ and $$f(1) = \lim_{x\:\uparrow \: 1}\arctan(\frac{x}{1-x^2}) + \pi = \lim_{x\:\downarrow \: 1} \arctan(\frac{x}{1-x^2}) + k_3\pi$$ where $\lim_{x \: \uparrow a}$ and $\lim_{x \: \downarrow \: a}$ denotes left and right limits respectively. Using that, $\lim_{y\rightarrow -\infty}\arctan(y) = -\pi/2$ and $\lim_{y\rightarrow \infty} \arctan(y) = \pi/2$ we find that $f(-1) = \frac12 \pi$ and $f(1) = \frac{3}{2} \pi$ and therefore $k_1 = 0$ and $k_3 = 2$, thus finally we get that

$$f(x) = \begin{cases} \arctan(\frac{x}{1-x^2}) &,\text{for } x\in (-\infty,-1) \\ \frac12 \pi &,\text{for } x=-1 \\ \arctan(\frac{x}{1-x^2}) + \pi &,\text{for } x\in (-1,1) \\ \frac32 \pi &,\text{for } x=1 \\ \arctan(\frac{x}{1-x^2}) + 2\pi &,\text{for } x\in (1,\infty) \end{cases}$$


You must log in to answer this question.

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