how to solve these equations

1 view (last 30 days)
asaf omer
asaf omer on 11 Jul 2019
Answered: Star Strider on 11 Jul 2019
hi, everyone
i wanna find a specific answer for these equations :
a^2+b*c==-1
,a*b+b*d==1,
a*c+c*d==-1,
d^2+b*c==0
which matlab function can i use to solve the equations above?
btw ,without using matlab , how can i solve it?

Answers (2)

Stephan
Stephan on 11 Jul 2019
for only real solutions:
syms a b c d real
eq(1) = a^2+b*c==-1;
eq(2) = a*b+b*d==1;
eq(3) = a*c+c*d==-1;
eq(4) = d^2+b*c==0;
res = solve(eq);
res_a = res.a
res_b = res.b
res_c = res.c
res_d = res.d
otherwise, if complex solutions are also needed:
syms a b c d
eq(1) = a^2+b*c==-1;
eq(2) = a*b+b*d==1;
eq(3) = a*c+c*d==-1;
eq(4) = d^2+b*c==0;
res = solve(eq);
res_a = res.a
res_b = res.b
res_c = res.c
res_d = res.d

Star Strider
Star Strider on 11 Jul 2019
You already formatted them to work with the Symbolic Math Toolbox (unless the ‘==’ means a logical operation), so:
syms a b c d
[a,b,c,d] = solve(a^2+b*c==-1, a*b+b*d==1, a*c+c*d==-1, d^2+b*c==0, [a,b,c,d])
Without using MATLAB, use the paper and pencil approach.

Categories

Find more on Mathematics 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!