Exponential Derivative 0725D1
1. **Problem Statement:** We want to find the nth order derivative of the exponential function $e^{ax}$, where $a$ and $x$ are constants and $n$ is a positive integer.
2. **Formula Used:** The derivative of $e^{ax}$ with respect to $x$ is given by the chain rule:
$$\frac{d}{dx} e^{ax} = a e^{ax}$$
3. **Important Rule:** Taking the derivative repeatedly $n$ times (nth order derivative) multiplies the function by $a$ each time:
$$\frac{d^n}{dx^n} e^{ax} = a^n e^{ax}$$
4. **Explanation:**
- The first derivative multiplies by $a$ once.
- The second derivative multiplies by $a$ again, resulting in $a^2 e^{ax}$.
- Continuing this pattern, the nth derivative multiplies by $a$ $n$ times, giving $a^n e^{ax}$.
5. **Code Explanation:**
- The function `nth_order_derivative` calculates $a^n e^{ax}$ using `std::pow(a, n)` for $a^n$ and `std::exp(a * x)` for $e^{ax}$.
- Inputs are the constants $a$, $x$, and the order $n$.
- The output is the value of the nth derivative at the point $x$.
**Final answer:**
$$\frac{d^n}{dx^n} e^{ax} = a^n e^{ax}$$