Please help me to solve two nonlinear algebraic equations

eq1 = b5*L1^2 + (b9 + b7)*L1 + b6*L2^2 + b10*L2 + b8 = 0:
eq2 = b27*L1^4 - b32*L1^3 + b33*L1^2 - b34*L1 ...
+ b28*L2^4 - b35*L2^3 + b36*L2^2 - b37*L2 ...
+ (b39 - b38 + b30 - b29 - b31) = 0:
%Solve the system for L1 and L2
solutions = solve({eq1, eq2}, {L1, L2}):

Answers (1)

Matt J
Matt J on 14 Jun 2026 at 0:56
Edited: Matt J on 14 Jun 2026 at 0:58
syms L1 L2
eq1 = b5*L1^2 + (b9 + b7)*L1 + ...
b6*L2^2 + b10*L2 + b8 == 0;
eq2 = b27*L1^4 - b32*L1^3 + b33*L1^2 - b34*L1 + ...
b28*L2^4 - b35*L2^3 + b36*L2^2 - b37*L2 + ...
(b39 - b38 + b30 - b29 - b31) == 0;
% Solve the system for L1 and L2
solutions = vpasolve([eq1, eq2], [L1, L2])

5 Comments

Tarek
Tarek on 14 Jun 2026 at 1:13
Edited: Tarek on 14 Jun 2026 at 1:13
please help @Matt J
Attempt to execute SCRIPT sym as a function:
C:\toolbox\symbolic\symbolic\@sym\sym.m
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
Error in Untitled (line 1)
syms L1 L2
Do you have a script names 'sym' somewhere? You shouldn't.
which -all sym
/MATLAB/toolbox/symbolic/symbolic/@sym/sym.m % sym constructor
Tarek
Tarek on 14 Jun 2026 at 2:10
Edited: Tarek on 14 Jun 2026 at 2:11
yes, i don't know to solve this problem??
Are you delet this file??
What do you get when you type
which -all sym
in the command editor ?
Maybe this answer helps:
Matt J
Matt J on 14 Jun 2026 at 13:54
Edited: Matt J on 14 Jun 2026 at 13:55
Do not delete
/MATLAB/toolbox/symbolic/symbolic/@sym/sym.m
Delete any other scripts named sym.m

Sign in to comment.

Tags

Asked:

T K
on 14 Jun 2026 at 0:14

Edited:

on 14 Jun 2026 at 13:55

Community Treasure Hunt

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

Start Hunting!