please help me in solving these equation showing error 0-by-1 and warning: Unable to find explicit solution

syms f k_3 k_2 n k_1
eqn1= 0.00001168245 - k_1 - k_2/(1 + (0.00008662/(f - k_3*((0.00001168245)^2)))^n)==0;
eqn2=0.0000253 - k_1 - k_2/(1 + (0.000135034/(f - k_3*((0.0000253)^2)))^n)==0;
eqn3=0.00001187352 - k_1 - k_2/(1 + (0.0000973094/(f - k_3*((0.00001187352)^2)))^n)==0;
eqn4=0.00001437763 - k_1 - k_2/(1 + (0.00011957/(f - k_3*((0.00001437763)^2)))^n)==0;
eqn5=0.0000397437 - k_1 - k_2/(1+(0.00014748/(f - k_3*((0.0000397437)^2)))^n)==0;
eqns=[eqn1,eqn2,eqn3,eqn4,eqn5];
vars=[f k_3 k_2 n k_1];
answer = solve(eqns, vars);
vpa(answer.f)
vpa(answer.k_1)
vpa(answer.k_2)
vpa(answer.n)
vpa(answer.k_3)

4 Commenti

For numerical solution, there are two global resultes like below:
1:
f: 0.000150627288762066
k_3: 20692.3393050462
k_2: -3.03407538816953E-5
n: 11.3814222998313
k_1: 4.19540529594175E-5
2:
f: -3.32458289449936E-6
k_3: -26162.4632160216
k_2: 0.00012373519827512
n: 0.880792501612057
k_1: 1.09793560830576E-5
You are using floating point constants, but you are also using solve() . solve() is for attempting to find indefinitely-precise solutions, preferably closed-form -- not aimed at finding numeric solutions, but rather aimed at finding formulas that are exact solutions.
But when you use floating point constants with symbolic expressions, you have no control over how the floating point constants will be converted to symbolic numbers. You might find your floating point number converted to rational 73/871501 or to 7008889110210299/590295810358705651712 or to 91*sqrt(547)/402 or to . The one thing it is somewhat unlikely to be converted to is
By the time the symbolic toolbox receives 0.00001437763 for conversion to symbolic numbers, it will already have been converted from text (in the program) to binary double precision -- a 53 bit conversion process in base 2. 1/10 is not something that can be exactly converted to finite binary fractions, so if you have floating point fractions you will seldom see them converted to fractions of powers of 10 denominators.
Effectively, unless you are very careful, the conversion from your floating point constants to symbolic numbers gives you GIGO (Garbage In, Garbage Out) as far as solving for exact solutions goes.
So, you should either be very careful as to exactly how you specify the numbers... or you should refrain from using the function dedicated to finding exact solutions -- for example use vpasolve
Note that you have expressions ^n where n is one of the unknowns. You will rarely be able to solve for exact integer powers or for lambertw . When you have an unknown power, you should assume that you will need to find approximate numeric solutions rather than exact formulas.

Accedi per commentare.

Risposte (1)

Not every system of equations, or even single equation, can be explicitly solved.
in your case the single equations can be solved, but the system can't.
What i suggest is to plot the equations and actually see where are the solutions, and then solve it numerically per intervals using vpasolve() or fzero()

Richiesto:

il 24 Apr 2023

Commentato:

il 25 Apr 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by