How to solve two simultaneous equations using solve command?
Show older comments
I want to solve these two simultaneous equations:
eqn1 = 0.75*k*B1^3 + 0.75*k*B1*B2^2 - m*w^2*B1 + c*B1 -D*w*B2- A == 0
eqn2 = 0.75*k*B2^3 + 0.75*k*B2*B1^2 - m*w^2*B2 + c*B2 -D*w*B1 == 0
and find what is the (B1^2+B2^2)^(1/2) (square root of B1 squared plus B2 squared ) and also plot the (B1^2+B2^2)^(1/2) Vs w.
So far I wrote my code until here and i dont know how to continue:
syms A m c k w D B1 B2
eqn1 = 0.75*k*B1^3 + 0.75*k*B1*B2^2 - m*w^2*B1 + c*B1 -D*w*B2- A == 0;
eqn2 = 0.75*k*B2^3 + 0.75*k*B2*B1^2 - m*w^2*B2 + c*B2 -D*w*B1 == 0 ;
eqn1 = subs(eqn1, [k,m,c,A,D], [0.2,1,1,1,0.2]);
eqn2 = subs(eqn2, [k,m,c,A,D], [0.2,1,1,1,0.2]);
sol1 = abs(solve(eqn1,B1));
sol2 = abs(solve(eqn2,B2));
Accepted Answer
More 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!