How to solve a system of logarithmic equations?

360 Views Asked by At

I need to create a function with the following properties: $$f(1)=1$$ $$f(65)=75$$ $$f(100)=100$$

Additionally, the function needs to grow logarithmically. So that gives three equations: $$A \cdot \ln(B \cdot 1 + C) = 1$$ $$A \cdot \ln(B \cdot 65 + C) = 75$$ $$A \cdot \ln(B \cdot 100 + C) = 100$$

I am having trouble with using substitution to solve this. Barring there is no analytic way to solve this system, how would I use a numerical approximation for $A, B$ and $C$?

3

There are 3 best solutions below

6
On

Hint: Try taking the exp of both sides of each equation. For instance taking exp of both sides of $A \cdot \ln(B \cdot 1 + C) = 1$ gives $e^{A \cdot \ln(B+ C)}=e.$ That means $e^{\ln(B + C)^A}=e.$ So, $$(B + C)^A=e.$$

0
On

This is not an answer, just what I tried using Count Iblis's hint.

Let $$f(x) = A\ln(x+B)+ C$$

You can always write the function with the coefficient of $x$ being $1$, so we assume that it is.

\begin{align*} f(1)&=A\ln(1+B)+ C=1\\ f(65)&=A\ln(65+B)+ C=75\\ f(100)&=A\ln(100+B)+ C=100 \end{align*}

We use Count Iblis's strategy (dividing the second and third equations by the first) to get these equations:

\begin{align*} \frac{75-C}{1-C}&=\frac{\ln(65+B)}{\ln(1+B)}\\ \frac{100-C}{1-C}&=\frac{\ln(100+B)}{\ln(1+B)} \end{align*}

We can rewrite these as

\begin{align*} (1+B)^{\frac{75-C}{1-C}} &=65+B\\ (1+B)^{\frac{100-C}{1-C}} &=100 + B \end{align*}

If we let $m = 1+B$ and $n=1-C$ we get

\begin{align*} m^{1 + (74/n)} &= m + 64\\ m^{1 + (99/n)} &= m + 99 \end{align*}

Not sure what to do from here ...

0
On

Let us change the equation slightly (without any loss of generality) writing $$Bx+C=B(x-1)+(B+C)=D+B(x-1)$$ So, the equations become $$A\log(D)=1$$ $$A\log(D+64B)=75$$ $$A\log(D+99B)=100$$ so, writing differences $$75-1=A\log(D+64B)-A\log(D)=A\big(\log(D+64B)-\log(D)\big)=A \log\Big(1+64\frac BD\Big)$$ $$100-1=A\log(D+99B)-A\log(D)=A\big(\log(D+99B)-\log(D)\big)=A \log\Big(1+99\frac BD\Big)$$ Now, making the ratio $$\frac{74}{99}=\frac{\log\Big(1+64\frac BD\Big) }{\log\Big(1+99\frac BD\Big)}$$ Now, define $\alpha=\frac BD$ and we just have one equation fo solve for $\alpha$ $$\frac{74}{99}=\frac{\log(1+64\alpha) }{\log(1+99\alpha)}$$ which can write $$f(\alpha)=74\log(1+99\alpha)-99\log(1+64\alpha)=0$$ This equation can easily be solved using Newton method using a reasonable starting point $\alpha_0 >\frac{1}{160}$ since this corresponds to the solution of $f'(\alpha)=0$ and corresponds to a maximum of the function.

Using $\alpha_0=0.01$, the successive iterates are $$\alpha_1=0.020697549639315120708$$ $$\alpha_2=0.017552368652124192289$$ $$\alpha_3=0.017486590789402401622$$ $$\alpha_4=0.017486542504336179435$$ $$\alpha_5=0.017486542504309897026$$ which is the solution for $20$ significant figures.

Now, using $$74=A \log(1+64\alpha)$$ we then obtain $$A=98.53400808297250480$$ and using $$A\log(D)=1$$ we then obtain $$D=1.0102004538294647697$$ and, finally, using $$\alpha=\frac BD$$ we obtain $$B=0.017664913173762083069$$ As you can notice, we only had to solve one single nonlinear equation in $\alpha$, all the remaining involving very basic calculations. If you really want the value of $C$, just use $B+C=D$ to get $$C=0.9925355406557026866$$

Edit

Just for your curiosity (don't worry : you will hear about that soon), we can approximate function $f(\alpha)$ using a Pade approximant around $\alpha=0$. This would give $$f(\alpha)=\frac{990 \alpha-\frac{21076275 \alpha^2}{323}}{1+\frac{92626 \alpha}{969}}$$ the numerator of which being zero for $\alpha=\frac{1938}{127735}\approx 0.015172$.

Edit

The problem could be generalized. Suppose that the equations are $$y_i=A\log(Bx_i+C)$$ Define $D=Bx_1+C$ to write $$y_i=A\log\big(D+B(x_i-x_1)\big)$$ So doing the same $$\frac{y_2-y_1}{y_3-y_1}=\frac{\log\big(1+(x_2-x_1)\alpha\big)}{\log\big(1+(x_3-x_1)\alpha\big)}$$ Solve for $\alpha$ (if a solution exists) and continue the same process as above.