cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

12-Amethyst

## equation solve

Hello,

I am using the solve command to solve for EC for a given matrix of sigma.s, It is unable to find a solution. Please suggest.

Thanks,

Faisal

ACCEPTED SOLUTION

Accepted Solutions
25-Diamond I
(To:fahmed-2)

You should have said in the other thread that you just want it to be solved using specific values and not symbolically.

With c=0.5 you end up with a cubic equation and the symbolic solve is able to provide all three solutions for each value of sigma.s

But the expression in parenthesis is a scalar and this can't equal a vector sigma.s

You may turn the symbolic calculation into a function of sigma.s and later call that function vectorized to get the 5 x 3 solutions. Note that the solutions with 10^-16 or so as imaginary part are supposed to be real values.

If you are just looking for one real solution, you may consider using the numeric "root" function (you may also use a solve block instead):

In case you are interested in the negative values for EC only, you may use a solve block with an appropriate constraint or the root function in its second flavor:

Worksheet in format Prime 6 attached.

Not, that if you use Prime 6 the symbolic solution will only work if you set the calculation to "Legacy symbolic" which activates muPad. The new FriCAS is not able to solve this cubic equation.

2 REPLIES 2
25-Diamond I
(To:fahmed-2)

You should have said in the other thread that you just want it to be solved using specific values and not symbolically.

With c=0.5 you end up with a cubic equation and the symbolic solve is able to provide all three solutions for each value of sigma.s

But the expression in parenthesis is a scalar and this can't equal a vector sigma.s

You may turn the symbolic calculation into a function of sigma.s and later call that function vectorized to get the 5 x 3 solutions. Note that the solutions with 10^-16 or so as imaginary part are supposed to be real values.

If you are just looking for one real solution, you may consider using the numeric "root" function (you may also use a solve block instead):

In case you are interested in the negative values for EC only, you may use a solve block with an appropriate constraint or the root function in its second flavor:

Worksheet in format Prime 6 attached.

Not, that if you use Prime 6 the symbolic solution will only work if you set the calculation to "Legacy symbolic" which activates muPad. The new FriCAS is not able to solve this cubic equation.

12-Amethyst
(To:Werner_E)

Thank you very much and sorry for the early mistake. It helped me and I will work with it more to see with other changes.

Faisal

Announcements

Top Tags