Solving a complex set of on-linear equations
Show older comments
Hello
I have a complex set of equations I am trying to solve.
The givens (knowns) are: a, b, c, d, l, w , n , m , p , f , g and h
I want to solve the equations to get x = ..... in terms of the input variables above.
I ran the following code
syms x y a b c d m n Fa Fc Fi Fs l w g h p f
Eqn1=x*y/b+b*y*((0.5517+y)/(1+2.167*y))/(c/(1-c))-d==0 ;
Eqn2= a*1000/((4*(l+Fc+Fi)*(w+Fa+Fs))+((n-4)*(l+Fc+Fi)*(w+2*Fa)))==y;
Eqn3= (0.1656*x-(0.0043*x^3)+0.105*p-(0.0032*p^2)+0.0394*x*p)*(0.3844+0.06166*(m-x)+0.001822*(l+w)-(0.000178*(m-x)*(l+w)))==Fa;
Eqn4= (0.1656*x-(0.0043*x^3)+0.105*f-(0.0032*f^2)+0.0394*x*f)*(0.3844+0.06166*(m-x)+0.001822*(l+w)-(0.000178*(m-x)*(l+w)))==Fc;
Eqn5=(0.1656*x-(0.0043*x^3)+0.105*g-(0.0032*g^2)+0.0394*x*g)*(0.3844+0.06166*(m-x)+0.001822*(l+w)-(0.000178*(m-x)*(l+w))) ==Fi;
Eqn6=((0.1656*x-(0.0043*x^3)+0.105*h-(0.0032*h^2)+0.0394*x*h)*(0.3844+0.06166*(m-x)+0.001822*(l+w)-(0.000178*(m-x)*(l+w))))==Fs;
Eqns =[Eqn1, Eqn2, Eqn3, Eqn4, Eqn5, Eqn6]
solx = solve(Eqns,x)
When I run
solx.x
to get the answer it returns Empty sym: 0-by-1
What am I doing wrong and how can I solve the equation in terms of x
1 Comment
Bjorn Gustavsson
on 22 Jul 2020
Well, you have 6 equations and one unknown. That means that your equations might each have a solution, but they might not be the same, and if those solutions are not the same your system of solutions doesn't have a solution.
Even if you treat both x and y as unknowns you still have 6 equations in 2 unknowns. Then you might separate them into 3 pair of equations for x and y, where the solutions might again "not necessarily" be the same - and we'd be back at the same scenario as above.
Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!