MATLAB symbolic solve function is taking a very long time
    15 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Rupamathi Jaddivada
 am 30 Dez. 2016
  
    
    
    
    
    Kommentiert: Walter Roberson
      
      
 am 30 Dez. 2016
            Hello,
I have a non-linear system of symbolic equations. There are six equations and I need to solve for six unknowns. However, these equations have so many terms even after using 'simplify' command of MATLAB.
Previously, I was working with four equations and four unknowns. First, I tried to solve for each unknown separately. i.e. solve first equation for x_1 in terms of x_2,...x_4. Substitute the expression for x_1 in the rest of equations. Then, find x_2 using second equation and continue this way till all four variables are found. This was taking a longer time than solving all four equations at once.
Now when I try to solve six equations for six variables, none of the methods work any longer. I waited for hours for MATLAB to solve this system of equations. But it doesn't seem to work. Any help would be greatly appreciated.
Thanks, Rupa
I Was
1 Kommentar
Akzeptierte Antwort
  John D'Errico
      
      
 am 30 Dez. 2016
        You don't show what you actually have. What you don't realize is that things go to hell exponentially fast here. Even if a solution exists (which is fairly rare for nonlinear symbolic systems) it will take a seriously LONG time. Those many terms expand and multiply to the point that you will probably not succeed.
You talk about a nonlinear system. You may also be under the wheels of mathematical impossibility. For example, even simple low order polynomial systems, when you start to add equations, grow in effective order. For example, consider two quadratic polynomial equations in two unknowns. You can solve for one variable in terms of the other and then substitute. But that results in a single equation that is higher degree than quadratic. Now do this with 6 variables. Each time you eliminate one of the variables (in sort of a Gaussian elimination scheme) the order of the equations that remain grow. Very quickly, the order of what remains is higher than a 4th degree polynomial. At that point, MATLAB may keep on trying, but it will just keep on spinning its wheels, since there is NO general solution to the roots of a higher than 4th degree polynomial.
Odds are this is what you have done, so I predict that no matter what, you will never get a solution. Again, all a guess, since we don't see your actual problem.
2 Kommentare
  Walter Roberson
      
      
 am 30 Dez. 2016
				It is very unlikely that you would be able to get a closed form symbolic solution for that situation. You might get lucky and there might be an expression in terms of the roots of a large order polynomial, which would at least allow you to calculate the complete set of solutions.
More likely you are going to need to use vpasolve() to find a numeric solution.
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



