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: 
Considering $y=f(x)$, you get:
$$(x)'\_x=(e^{xy})'\_x \Rightarrow \\
1=e^{xy}\cdot (y+xy')\Rightarrow \\
y'=\frac{1-ye^{xy}}{xe^{xy}}$$
Wolfram [answer](https://www.wolframalpha.com/input/?i=derivative%20x%3De%5Exy).

Alternatively:
$$ F(x,y)=x-e^{xy}=0\\
\frac{dy}{dx}=-\frac{F\_x}{F\_y}=-\frac{1-ye^{xy}}{-xe^{xy}}=\frac{1-ye^{xy}}{xe^{xy}}$$
Sure, you can use implicit differentiation. You will get

$$\delta x = (x\delta y + y\delta x)e^{xy}.$$

(Here I've used $\delta x$ to indicate a variation in $x$, to clearly distinguish a variation $\delta$ in a variable from the differential operator $d$ on functions. But you might see $dx$ and $dy$ instead of $\delta x$ or $\delta y$ in your course notes or textbook.)

Now you can solve for $\delta y$ as a function of $\delta x$, away from $x=0$:

$$\delta y = \frac{e^{-xy} -y}{x} \delta x.$$