Solving system of 3 nonlinear Equations
2 views (last 30 days)
Show older comments
Hello. I am having trouble finding the solutions to system of 3 Equations...
fun1 = EPS0*(E1*A1 + E2*A2) - (1/RO)*(E1*A1*e_y1 + E2*A2*e_y2) == 0
fun2 = E1*EPS0*A1*e_z1 + E2*EPS0*A2*e_z2 - (E1/RO)*(I_y1z1 + e_y1*e_z1*A1) - (E2/RO)*(I_y2z2 + e_y2*e_z2*A2) == -M*sin(alfa)
fun3 = E1*EPS0*A1*e_y1 + E2*EPS0*A2*e_y2 - (E1/RO)*(I_z1 + (e_y1^2)*A1) - (E2/RO)*(I_z2 + (e_y2^2)*A2) == M*cos(alfa)
S = vpasolve(fun1==0,fun2==-M*sin(alfa),fun3==M*cos(alfa))
S.RO
S.alfa
S.EPS0
alfa is "hidden" in I_yz and e_yz components of the equation, for example:
I_z1 = (((a^3)*b + a*b^3)/384) + (((a^3)*b - a*b^3)/384)*cos2a
How can I solve those 3 equations, since I am certain there is something wrong with results I get...
0 Comments
Accepted Answer
Stephan
on 8 May 2019
Edited: Stephan
on 8 May 2019
syms EPS0 E1 A1 E2 A2 RO e_y1 e_y2 e_z1 e_z2 I_y1z1 I_y2z2 M I_z1 I_z2 alfa
fun1 = EPS0*(E1*A1 + E2*A2) - (1/RO)*(E1*A1*e_y1 + E2*A2*e_y2) == 0
fun2 = E1*EPS0*A1*e_z1 + E2*EPS0*A2*e_z2 - (E1/RO)*(I_y1z1 + e_y1*e_z1*A1) - (E2/RO)*(I_y2z2 + e_y2*e_z2*A2) == -M*sin(alfa)
fun3 = E1*EPS0*A1*e_y1 + E2*EPS0*A2*e_y2 - (E1/RO)*(I_z1 + (e_y1^2)*A1) - (E2/RO)*(I_z2 + (e_y2^2)*A2) == M*cos(alfa)
S.RO = isolate(fun1, RO);
S.EPS0 = isolate(subs(fun2,RO,rhs(S.RO)),EPS0);
S.alfa = isolate(subs(subs(fun3,RO,rhs(S.RO)),EPS0,rhs(S.EPS0)),alfa);
S.RO
S.EPS0
S.alfa
Using this results you can first calculate alfa to get EPS0, then use EPS0 to calculate RO.
0 Comments
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox 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!