Calculating multiple parameters for a logarithmic function

71 Views Asked by At

I have the following function -

$$y=\ln(Ax^D+B+Cx^E)$$

These are the coordinates:
$$(1, 1)$$$$(2, 0.84)$$$$(4, 1.5)$$$$(31, 4.1)$$$$(44, 5)$$

How can you solve this equation and what is the correct method for finding the $A,B,C,D$ and $E$ parameters?

EDIT

It seems that the last coordinate is causing a problem.
Anyway what's the correct way to find the equation without the last coordinate and as close as possible?

2

There are 2 best solutions below

9
On BEST ANSWER

Too long for a comment, but may be of some use:

I have omitted the last set of coordinates as the OP has requested.

Substitute $(1,1)$: $$A+B+C=e\tag{1}$$

Substitute $(2,0.84)$: $$A\cdot2^D+C\cdot2^E+B=e^{0.84}\tag{2}$$

Substitute $(4,1.5)$: $$A\cdot2^{2D}+C\cdot2^{2E}+B=e^4\tag{3}$$

Substitute $(31,4.1)$: $$A\cdot31^D+C\cdot31^E+B=e^{4.1}\tag{4}$$

Do $(3)-(2)$: $$A\cdot2^D(2^D-1)+C\cdot2^E(2^E-1)=e^4-e^{0.84}\tag{5}$$

Do $(2)-(1)$: $$A\cdot(2^D-1)+C\cdot(2^E-1)=e^{0.84}-e\tag{6}$$

Simultaneous equation so solve for $A$ and $C$ in terms of $D$ and $E$.

Multiply $(7)$ by $2^E$: $$A\cdot2^E(2^D-1)+C\cdot2^E(2^E-1)=2^E(e^4-e^{0.84})\tag{7}$$

Do $(8)-(6)$: $$A(2^E-2^D)(2^D-1)=(2^E-1)(e^4-e^{0.84})$$ so $$A=\frac{(2^E-1)(e^4-e^{0.84})}{(2^E-2^D)(2^D-1)}\tag{8}$$

Substitute $(9)$ into $(7)$: $$C=\frac{(2^E-2^D)(e^{0.84}-e)-(2^E-1)(e^4-e^{0.84})}{(2^E-2^D)(2^D-1)}\tag{9}$$

Substitute $(9)$ and $(10)$ into $(1)$: $$B=e-\frac{e^{0.84}-e}{2^D-1}\tag{10}$$

Now $A$ and $C$ are in terms of $D$ and $E$, but $B$ is only in terms of $D$.

0
On

The model

$$Ax^D+B+Cx^E=e^y$$ is partly linear and partly nonlinear and has no closed-form solution. You can make it slightly more tractable numerically by plugging the coordinates of the five points to obtain five equations, and eliminate the coefficients $A,B,C$ by forming linear combinations (for instance, you can solve the three first equations by Cramer and plug in the remaining two).

In the end, you will obtain as simplified system of two equations in the two unknowns $D$ and $E$ (though these equations involve ten exponentials). This can be solved by Newton in a less costly way than the original system, and as there are only two independent variables left, graphical observation is possible.