solving a system of nonlinear equations containing logarithm

540 Views Asked by At

I need to solve the following system of equations analytically if it's possible, or numerically, for (x1, x2, x3, x4) :

ln[x1+0.450*x2] + 1.61*x3*(1+0.200*x4) - 1.610 = 0
ln[x1+0.380*x2] + 2.30*x3*(1+0.143*x4) - 1.946 = 0
ln[x1+0.333*x2] + 3.00*x3*(1+0.111*x4) - 2.400 = 0
ln[x1+0.260*x2] + 3.69*x3*(1+0.067*x4) - 2.710 = 0

if there is no analytical solution, all i need is which algorithm should i implement to solve this system numerically and thank you

1

There are 1 best solutions below

0
On

I think I should simplify the problem. Using $(1)$ and $(2)$, we can easily elimate $x_3$ and then $x_4$ to get (using whole numbers) $$x_3=\frac{-14000 \log \left(x_1+\frac{19 }{50}x_2\right)+14300 \log \left(x_1+\frac{9 }{20}x_2\right)+4221}{9177}$$ $$x_4=-\frac{20 \left(3500 \log \left(x_1+\frac{19 }{50}x_2\right)-5000 \log \left(x_1+\frac{9 }{20}x_2\right)+1239\right)}{14000 \log \left(x_1+\frac{19 }{50}x_2\right)-14300 \log \left(x_1+\frac{9 }{20}x_2\right)-4221}$$ which leaves with $$\log \left(x_1+\frac{333 }{1000}x_2\right)-\frac{890}{437} \log \left(x_1+\frac{19 }{50}x_2\right)+\frac{3200 }{3059}\log \left(x_1+\frac{9 }{20}x_2\right)-\frac{2643}{21850}=0\tag 3$$ $$\log \left(x_1+\frac{13 }{50}x_2\right)-\frac{861}{230} \log \left(x_1+\frac{19 }{50}x_2\right)+\frac{492}{161} \log \left(x_1+\frac{9 }{20}x_2\right)-\frac{39697}{115000}=0 \tag 4$$ At this point, we cannot do anymore elimination and numerical methods are required.

Using Newton-Raphson starting with $x_1=-1-i$ and $x_2=1+2i$, what I obtained is $$x_1 \approx -0.124158+0.761028\, i$$ $$x_2 \approx 1.34246 -2.09653\, i$$ to which correspond $$x_3 \approx 0.867017 -0.425436\, i$$ $$x_4 \approx 1.05774 +4.27341 \, i$$ which are not identical to those given by Mariusz Iwaniuk in comments.

However, changing the starting points, I obtained the same numbers as above with opposite sign for the imaginary part and this agrees with the numbers given by Mariusz Iwaniuk in comments.

What is interesting is to have a look at the contour plot of the norm $$\Phi(x_1,x_2)=(eq_3)^2+(eq_4)^2=k$$ Being almost blind, I really have trouble but my wife tells that as long as I make $k=0.010, 0.009, 0.008, 0.007, 0.006, 0.005$ we can percieve a contour line but $k < 0.005$ does not give anything.

Making a 3D plot of $$\Psi(x_1,x_2)=(eq_3)^2+(eq_4)^2$$ seems to reveal that $0$ cannot be obtained except, may be, for extremely large values of $x_1$ and $x_2$.