Solving non linear system of equations

4 views (last 30 days)
Mike Krause
Mike Krause on 14 Dec 2020
Edited: John D'Errico on 14 Dec 2020
I am trying to have Matlab solve this sysyem of non liear equations. The unknowns are the Ublade term and the B2 term. I have been told that fsolve can do this but getting it set up correctly has been a bit of a hassle.

Answers (1)

John D'Errico
John D'Errico on 14 Dec 2020
Edited: John D'Errico on 14 Dec 2020
Are theta_rotor, theta_stator, and u_axial all known values? If not, then no, fsolve cannot solve it. But if we assume those are known parameters, then you can do a LOT of work yourself. In fact, it appears as if a solution does exist that we can do by hand.
Write the first equation as
u_blade/u_axial = tan(theta_stator) + tan(b2)
Now, add theta_rotor to both sides of (2), then take the tan. This gives us
tan(b2 + theta_rotor) = u_blade/u_axial
But we already have the ratio of u_blade to u_axial, so eliminate them to get only one equation in the unknown b2.
tan(b2 + theta_rotor) = tan(theta_stator) + tan(b2)
Again, theta_rotor and theta_stator are knowns. We now go to a table of trig identities, to get the tan of a sum of terms, and we can expand the left hand side.
Or, I can just be lazy as hell, and let MATLAB do the work.
syms b2 theta_rotor theta_stator
bssol = solve( tan(b2 + theta_rotor) == tan(theta_stator) + tan(b2),b2)
bssol = 
Once you know b2 (It is completely given there, as two distinct solutions, now you can trivially return to recover u_blade.
Why bother with fsolve, when an analytial solution is available? I hardly needed MATLAB at all, until I got too lazy at the end. But pencil and paper would have been sufficient. Note that had I just fed these two equations directly into solve, then solve should have been able to find the solution on its own. But would that have been any fun?

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!