Question: I was trying to find the smallest solution for $k$ to the following equation.
$ a^k = b\bmod c$. The problem is, the $'k'$ I get may not be the smallest. To find the smallest such $k$, I need to compute $O\_c(a)$. I was only able to find resources that say that $O\_c(a)|\phi(c)\ or \ \lambda(c)$ when $a$ and $c$ are coprime. Is there any such relation when $a$ and $c$ are non-coprime?

Answer: 
If you want to use partial derivatives, that is an option

$1 = \frac{\partial}{\partial x}(e^{xy}) + \frac{\partial}{\partial y}(e^{xy})\frac{dy}{dx}$

$1 = ye^{xy} + (xe^{xy})\frac{dy}{dx}\\
\frac {1-ye^{xy}}{xe^{xy}} = \frac{dy}{dx}\\
\frac {e^{-xy} -y}{x} = \frac{dy}{dx}\\
$
$$x=e^{xy}\to 1=(y+xy')e^{xy}$$ or by drawing $y'$ and rewriting,

$$y'=\frac{e^{-xy}-y}{x}=\frac{1-xy}{x^2}=\frac{1-\log x}{x^2}.$$

---

It is possible to check this by expliciting $y$,

$$y=\frac{\log x}x$$ which gives

$$y'=\frac{1-\log x}{x^2}.$$