3 views (last 30 days)

b= solve ('(b^2 + a)^(3/2)*(2* b^3 - a^3 - 1) - b^3 - a^3*b^3 + 2* a^3=0','b')

Warning: Explicit solution could

not be found.

KINDLY HELP WHY I AM GETTING THIS ERROR

THANKS

Dyuman Joshi
on 21 Dec 2019

Instead of using '=' operator in the solve command, use '==' operator.

Also, it would be better to include the whole first term in a parenthesis .

syms a b

b = solve (((b^2 + a)^(3/2))*(2*b^3 - a^3 - 1) - b^3 - a^3*b^3 + 2*a^3==0,'b')

'=' is used to assign a value to a variable, while '==' is used for determining equality of any two variables.

(variables meaning numbers/elements/rows/columns/matrices etc)

Dyuman Joshi
on 21 Dec 2019

Walter Roberson
on 21 Dec 2019

Since R2018b you would need to use b or sym('b') as the second parameter of solve(), instead of 'b'

R2013b was just not able to deal with these kinds of equations.

Current MATLAB are able to do more than R2013b could do, if you do

syms a b real

S = solve (((b^2 + a)^(3/2))*(2*b^3 - a^3 - 1) - b^3 - a^3*b^3 + 2*a^3==0, b, 'returnconditions', true);

Sch = children(S.conditions);

p = collect(Sch(2), S.parameters);

pc = coeffs(lhs(p), S.parameters, 'all')

p is now a polynomial of degree 12, and pc is the vector of coefficients in descending order, suitable for passing to roots()

Opportunities for recent engineering grads.

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

Start Hunting!
## 0 Comments

Sign in to comment.