<s>[INST] How to solve $x\tan^2 x-\tan x+x-1=0$ One of my homework questions is to find where the gradient of $\frac{x}{1+\tan x}$ is zero. Using the quotient rule got me to $\frac{1+\tan x-x\sec^2 x}{(1+\tan x)^2}$. I know I can ignore the denominator when the equation is equal to $0$, thus resulting in $1+\tan x-x\sec^2 x$, which I rewrote as $x\tan^2 x-\tan x+x-1$ (using $\sec^2 A=\tan^2 A+1$, and multiplying through by $-1$)
So how do I solve this equation now?
 [/INST] If you remember that, up to few weeks ago, $x=\cos(x)$ did not show explicit solution even with special functions, there is no hope to find the zero of function
$$f(x)=x\tan^2 (x)-\tan (x)+x-1$$and numerical methods would be required.
However, you can have quite good approximations.
First, inspection
$$f(0)=-1 \qquad f\left(\frac{\pi }{4}\right)=\frac{\pi }{2}-2 <0\qquad f\left(\frac{\pi }{3}\right)=\frac{4 \pi }{3}-1-\sqrt{3} >0$$ the solution is just above $\frac{\pi }{4}$.
Make a series expansion around this value
$$f(x)=\frac{1}{2} (\pi -4)+\pi  \left(x-\frac{\pi }{4}\right)+2 (1+\pi )
   \left(x-\frac{\pi }{4}\right)^2+O\left(\left(x-\frac{\pi }{3}\right)^4\right)$$
So, using more and more terms and solving the polynomial in $\left(x-\frac{\pi }{4}\right)$, you will have
$$x_{(1)}=\frac \pi 4+\left(\frac{2}{\pi }-\frac{1}{2}\right)=0.922018$$
$$x_{(2)}=\frac \pi 4+\frac{\sqrt{16+3 (4-\pi ) \pi }-\pi }{4 (1+\pi )}=0.892036$$
while the solution is $x=0.887829$.
</s>