Solving system of 3 nonlinear Equations

조회 수: 2 (최근 30일)
simzieee
simzieee 2019년 5월 8일
편집: Stephan 2019년 5월 8일
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...

채택된 답변

Stephan
Stephan 2019년 5월 8일
편집: Stephan 2019년 5월 8일
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개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by