Problem: I am trying to calculate the formula for an exponential equation given $2 $points and the slope, but do not know the formula to do so.
What I have tried: With a quick google search, I found out that the formula to find the equation given $2$ points is as follows:
$$\begin{aligned}&\sqrt[x_1-x_2]{\frac{y_1}{y_2}}\\a&=\frac{y_1}{b^{x_1}}\\f(x)& = ab^x\end{aligned}$$
Therefore the full equation would be: $$f\left(x\right)=\left(\frac{y_1}{\left(\sqrt[x_1-x_2]{\frac{y_1}{y_2}}\right)^{x_1}}\right)\cdot\left(\sqrt[x_1-x_2]{\frac{y_1}{y_2}}\right)^x$$
The problem with this is that it doesn't take into account the slope of the exponential function.
Above is a simple example where I have 2 exponential functions that both go through the same 2 points yet have different slopes. One of them I created using the formula above and the other one I created using a bit of guess and check.
Question: What is the formula to calculate an exponential equation given two points AND the slope.
Note that $$ \eqalign{ & y = f(x) = a\,b^{\,x} = \,b^{\,x + c} = e^{\,u\,x + d} \quad \Rightarrow \cr & \Rightarrow \quad y' = u\,e^{\,u\,x + d} \quad \Rightarrow \quad {{y'} \over y} = u\quad \Rightarrow \cr & \Rightarrow \quad \left\{ \matrix{ \ln y = ux + d \hfill \cr \left( {\ln y} \right)' = {{y'} \over y} = u \hfill \cr} \right. \cr} $$
So that's just a linear interpolation in the plane $ x, \ln y$.
Therefore with two free parameters available you cannot have the curve to pass through two given points AND have there a given slope.