Is it correct to write that $$ \frac{\mathrm{d}}{\mathrm{d}x} \left( a^x \right) = a^x \log(a) $$ also for $a < 0$, where $\log$ is the natural logarithm?
I was trying to compute the derivative of $(-10)^x$. WolframAlpha gave the following result: $$ \frac{\mathrm{d}}{\mathrm{d}x} \bigl( (-10)^x \bigr) = (-10)^x (\log(10) + \mathrm{i}\pi),$$ but I am not sure if it is correct, because in this case the argument of logarithm is negative.
The reason why I am asking this question is becasue I want to calculate the following limit
$$\lim_{x \to \infty}\frac{|C_1a^x+C_2(ka)^x|^{A}+|C_3|^{A}-|C_1a^x+C_2(ka)^x-C_3|^{A}}{a^xD_1+(ka)^xD_2}$$
knowing that $-1<a<1$, $-1<k<1$, $1<A<2$ and $x \in \mathbb{N}$.
Since for $x \to \infty$ we have $\left[\frac{0}{0}\right]$, I use the de L'Hopital's rule.
$$\lim_{x \to \infty}\frac{|C_1a^x+C_2(ka)^x|^{A}+|C_3|^{A}-|C_1a^x+C_2(ka)^x-C_3|^{A}}{a^xD_1+(ka)^xD_2}=\left[\frac{0}{0}\right]=\lim_{x \to \infty}\frac{A|C_1a^x+C_2(ka)^x|^{A-1}sgn(C_1a^x+C_2(ka)^x)(C_1a^xlog(a)+C_2(ka)^xlog(ka)) ...}{a^xlog(a)D_1+(ka)^xlog(ka)D_2}\\\frac{-A|C_1a^x+C_2(ka)^x-C_3|^{A-1}sgn(C_1a^x+C_2(ka)^x-C_3)(C_1a^xlog(a)+C_2(ka)^xlog(ka))}{a^xlog(a)D_1+(ka)^xlog(ka)D_2}$$
Now, I take the expression $a^x$ in front of both nominator and denominator and reduce it obtaining
$$\lim_{x \to \infty}\frac{A|C_1a^x+C_2(ka)^x|^{A-1}sgn(C_1a^x+C_2(ka)^x)(C_1log(a)+C_2(k)^xlog(ka)) ...}{log(a)D_1+(k)^xlog(ka)D_2}\\\frac{-A|C_1a^x+C_2(ka)^x-C_3|^{A-1}sgn(C_1a^x+C_2(ka)^x-C_3)(C_1log(a)+C_2(k)^xlog(ka))}{log(a)D_1+(k)^xlog(ka)D_2}$$
and finally I obtain $\frac{A|C_3|^{A-1}sgn(C_3)C_1log(a)}{log(a)D_1}$ as the result.
At some point, I calculate the derivative of $a^x$ which is equal to $a^xlog(a)$ and I am sure that it is correct in the case of $0<a<1$, but what if $-1<a<0$? Can I write that the derivative of $a^x$ is $a^xlog(a)$ when $-1<a<0$? If not, how should I calculate this limit in the case of $-1<a<0$?
Of course $a^x$ where $a<0$ and $x$ is irrational is a complex number, not a real number. So let us define $$ \mathrm{Log}\; a $$ to be the principal value of the multivalued function $\log a$; that is the solution $z$ of $e^z=a$ with argument in $(-\pi,\pi]$. Then define $$ a^x = \exp(x\;\mathrm{Log}\;a) $$
So, when $a$ is real and negative, we have $\mathrm{Log}\;a = \log|a|+i\pi$ and $$ a^x = \exp(x\;\mathrm{Log}\;a) = \exp(x\; (\log|a|+i\pi)) =e^{x\log|a|}\; e^{i\pi x} = |a|^x\;\big(\cos(\pi x)+i\sin(\pi x)\big) $$
Now we are in a position to consider the derivative formula.
Use the product rule, $$ \frac{d}{dx}\big(a^x\big) = |a|^x\;\big(-\pi\sin(\pi x)+i \pi \cos(\pi x)\big) +|a|^x\;\log|a|\;\big(\cos(\pi x)+i\sin(\pi x)\big) $$ and on the other hand \begin{align} a^x\;\mathrm{Log}\;a &= |a|^x\;\big(\cos(\pi x)+i\sin(\pi x)\big)\;\big(\log|a|+i\pi\big) \\ &=|a|^x\;\big(\cos(\pi x)+i\sin(\pi x)\big)\;\big(\log|a|\big) +|a|^x\;\big(\cos(\pi x)+i\sin(\pi x)\big)\;\big(i\pi\big) \end{align} They agree.