# How to plot the derivative of an exponential function? [duplicate]

Plot[(1.8)^n, {n, 0.5, 10}]


Works fine, but this derivative gives an error and does not plot.

D[(1.8)^n, n] (* also ok *)
Plot[D[(1.8)^n, n], {n, 0.5, 10}, WorkingPrecision -> 300, PlotPoints -> 200]


General::ivar: 0.5000477864321607 is not a valid variable.

General::ivar: 0.5477864798994975 is not a valid variable.

General::stop: Further output of General::ivar will be suppressed during this calculation.

How might I be able to change this? The idea is to be able to plot something like this function and its derivative on the same plot.

 Plot[{(1.5)^n, D[(1.5)^n, n]}, {n, -10, 10}, Frame -> True]


Need to evaluate first, since Plot has holdall attribute.

    Plot[Evaluate[D[(18/10)^n, n]], {n, 0.5, 10}]


Other methods.

Plot[D[(18/10)^n, n], {n, 0.5, 10}, Evaluated -> True]

Plot[Derivative[1][(18/10)^# &][n], {n, .5, 10}]

Plot[Derivative[1][Function[n, (18/10)^n]][x], {x, .5, 10}]


Another method:

Plot[D[(1.8)^n, n] /. {n -> x}, {x, 0.5, 10}]