# Need help in solving the differentiation

I want to differentiate the following expression with respect to n:

$$\frac{d}{dn}[1-{(1-p)^n}^d]$$

I do not know which formula to use to differentiate this term with respect to n. Please can anybody help me?

I have tried like this:

$$\frac {d}{dn}(1-{(1-p)^n}^d)= -\frac{d}{dn}[{(1-p)^n}^d]=-\frac{d}{dn}[e^{n^dln(1-p)}]=-e^{n^dln(1-p)}.ln(1-p).dn^{d-1}$$ Is my answer correct?

• Can you differentiate $a^x$ with respect to $x$? And if you write it as $e^{x \ln a}$? Commented May 26, 2021 at 15:11
• Yes. $\frac{d}{dx}(a^x)$ is $lna.a^x$. Commented May 26, 2021 at 15:16
• Correct. Now apply that to your expression. Commented May 26, 2021 at 15:17
• Ok. I am going to try that now. Thanks. Commented May 26, 2021 at 15:18
• $\frac {d}{dn}(1-{(1-p)^n}^d)= -\frac{d}{dn}[{(1-p)^n}^d]=-\frac{d}{dn}[e^{n^dln(1-p)}]=-e^{n^dln(1-p)}.ln(1-p).dn^{d-1}$ Is my answer correct? Commented May 26, 2021 at 15:25

Assuming the $$d$$ in the exponent is a real number and that $$p\leq 1$$: $$\frac{d}{dn}[1-(1-p)^{n^d}] = -\frac{d}{dn}(1-p)^{n^d} = - \ln(1-p) \times (1-p)^{nd} \times \frac{d}{dn} (n^d) \\ = - n^{d-1}d(1-p)^{nd}\ln(1-p)$$ Which I believe is the same as your answer, although simplified.

• p cannot be equal to 1 it will be strictly less than 1 Commented May 26, 2021 at 15:53
• I believe x^t ln(x) goes to 0 for x going to 0 Commented May 26, 2021 at 15:58
• x going to zero is a different thing which doesn't necessarily means that x can be zero Commented May 26, 2021 at 16:01
• Thank you so much. Commented May 26, 2021 at 16:10

$$\frac{d}{dn}[1-{(1-p)^n}^d]$$ $$=-\frac{d}{dn}[{(1-p)^n}^d]$$

Let $$u={(1-p)^n}^{d}$$

therefore $$lnu=n^dln(1-p)$$

hence $$\frac{d}{dn}[lnu]$$=$$=\frac{d}{dn}[n^dln(1-p)]$$

$$\frac{1}{u} \frac{du}{dn}$$= $$n^d\frac{d}{dn}[ln(1-p)]+ln(1-p)\frac{d}{dn}[n^d]$$

$$\frac{1}{u} \frac{du}{dn}$$= $$\frac{n^d}{p-1}\frac{dp}{dn}+ln(1-p)n^{d-1}.d$$

$$\frac{du}{dn}$$=$$u(\frac{n^d}{p-1}\frac{dp}{dn}+ln(1-p)n^{d-1}.d)$$

$$\frac{du}{dn}$$=$${(1-p)^n}^{d}(\frac{n^d}{p-1}\frac{dp}{dn}+ln(1-p)n^{d-1}.d)$$

$$- \frac{du}{dn}$$ $$=-\frac{d}{dn}((1-p)^n)^{d}$$=$${-(1-p)^n}^{d}(\frac{n^d}{p-1}\frac{dp}{dn}+ln(1-p)n^{d-1}.d)$$
If you asssume p to be a constant then $$\frac{dp}{dn}=0$$
$$- \frac{du}{dn}$$ $$=-\frac{d}{dn}((1-p)^n)^{d}$$=$${-(1-p)^n}^{d}.ln(1-p)n^{d-1}.d$$