# $\tan(x)$ with phase shift and period

I'm trying to transform $$y=A \tan(Bx-C)+D$$ so that there are two consecutive vertical asymptotes at $x=17$ and $x=19$.

I want the period to equal $2$ and so I set $B=\pi/2$. I want a vertical asymptote at $17$ so I set $17+\pi/2=(2\times c)/\pi$. I get $$y=\tan\left(\frac{\pi}{19-17}x-\frac{2\times17\times\pi+\pi^2}{2(19-17)}\right)$$ But this isn't working according to an online graphing engine.

Any help on what I'm doing wrong.

-
In the third line you want asymptotes at $x=17,19$, then later you say you want one at $17+2\pi$. Which is it? – Ross Millikan Jan 30 '13 at 17:48
I want the asymptote at 17. I'll correct that, sorry. – user41728 Jan 30 '13 at 17:52
If you set $B$ as you did, then taking $C=0$ gives you vertical asymptote at $17$. – André Nicolas Jan 30 '13 at 17:53
I see that it works now but I thought that I would at least need to shift the vertical asymptote at $x=-\pi/2$ to $x=17$. With $C=0$ I am calculating (incorrectly I suppose) that the v.a.'s are at $-.5\pi,1.5\pi,...,15.5\pi,17.5\pi$. So how is there now a v.a. at $x=17$? – user41728 Jan 30 '13 at 18:02
Here is my thought process, in hopes of understanding better. I set $B=\pi/2$ so that the period would be $2$. So then I have $y=\tan (\frac{\pi}{2}x-C)$ and I want to get the shift right. If I shift it so there is a v.a. at $x=1$ I will be fine, so I get into standard form, i.e. $y=\tan (\frac{\pi}{2}(x-\frac{C}{\pi/2})$. If I shift my graph $(3\pi)/2$ it will work, so I set $(3\pi)/2=\frac{C}{\pi/2}$ in order to find $C$. But this gives me $C=(3/4)*\pi^2$, which actually doesn't work. – user41728 Jan 30 '13 at 18:22

Since you have asymptotes at $17,19$, you have one at $1$ and a zero at $0$. So $\tan \frac \pi 2 x$ should work. Here is the Alpha plot