Answer
The tangent lines at $x=\pi/4$ and $x=-\pi/4$ satisfy what the exercise asks for.
Work Step by Step
$$y=f(x)=\tan x\hspace{1cm}\{-\frac{\pi}{2}\lt x\lt\frac{\pi}{2}\}$$
1) Find $f'(x)$: $$f'(x)=\sec^2x=\frac{1}{\cos^2x}$$
To find all the tangent lines parallel with the line $y=2x$, we rely on the fact that parallel lines have the same slope. So first, we would find all values of $x$ for which $f'(x)=2$, which is the slope of $y=2x$.
$$\frac{1}{\cos^2x}=2$$ $$\cos^2x=\frac{1}{2}$$ $$\cos x=\pm\frac{\sqrt2}{2}$$
- For $\cos x=\sqrt2/2$:
On $(-\pi/2,\pi/2)$, there are two values of $x$ for which $\cos x=\sqrt2/2$, which are $x=\pi/4$ and $x=-\pi/4$.
We have $f(\pi/4)=\tan(\pi/4)=1$ and $f(-\pi/4)=\tan(-\pi/4)=-1$
The equation of the tangent line at $x=\pi/4$ is $$(y-1)=2(x-\frac{\pi}{4})=2x-\frac{\pi}{2}$$ $$y=2x-\frac{\pi}{2}+1=2x+\frac{2-\pi}{2}$$
The equation of the tangent line at $x=-\pi/4$ is $$(y+1)=2(x+\frac{\pi}{4})=2x+\frac{\pi}{2}$$ $$y=2x+\frac{\pi}{2}-1=2x+\frac{\pi-2}{2}$$
- For $\cos x=-\sqrt2/2$:
On $(-\pi/2,\pi/2)$, there are no values of $x$ for which $\cos x=-\sqrt2/2$.
Therefore, overall, the tangent lines at $x=\pi/4$ and at $x=-\pi/4$ satisfy the exercise.