2
$\begingroup$

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?

$\endgroup$
20
  • 2
    $\begingroup$ desmos.com/calculator/ragn6n1qqr $\endgroup$ – Mason Jul 15 '18 at 8:38
  • $\begingroup$ I've also tried to play with desmos but I couldn't get the exact function, so the question is what's the correct way to solve this $\endgroup$ – Drxxd Jul 15 '18 at 8:41
  • 1
    $\begingroup$ Where did you get this problem from? $\endgroup$ – TheSimpliFire Jul 15 '18 at 8:47
  • 1
    $\begingroup$ @Mason fitting the points in semi-log scale gives $R^2 = 1$ even with the fifth point desmos.com/calculator/vm1eh3qb28 sorry for the link before, I just realised that I gave your link instead of mine $\endgroup$ – Davide Morgante Jul 15 '18 at 9:04
  • 1
    $\begingroup$ @Mason ahah don't worry! It wasn't my brightest moment, got wrong too many things! My line of reasoning wanted to be the same as the answer of@YvesDaoust $\endgroup$ – Davide Morgante Jul 15 '18 at 13:57
1
$\begingroup$

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$.

$\endgroup$
9
  • $\begingroup$ If we had another equation then the expressions for $A,B,C$ could be substituted into the remaining two equations and could be solved simultaneously. $\endgroup$ – TheSimpliFire Jul 15 '18 at 9:10
  • $\begingroup$ That's great for this moment.. Thanks! $\endgroup$ – Drxxd Jul 15 '18 at 9:18
  • 1
    $\begingroup$ No, $4^D=(2^2)^D=2^{2D}\neq2^{D+1}$ $\endgroup$ – TheSimpliFire Jul 16 '18 at 10:43
  • 1
    $\begingroup$ the concept is still the same whether it is 1.5 or 4 $\endgroup$ – TheSimpliFire Jul 16 '18 at 10:43
  • 1
    $\begingroup$ Are you sure? Try $D=5$... $\endgroup$ – TheSimpliFire Jul 16 '18 at 13:18
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.