Skip to main content
14-Alexandrite
October 16, 2019
Solved

equation solve

  • October 16, 2019
  • 1 reply
  • 1774 views

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

Best answer by Werner_E

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.

clipboard_image_1.png

 

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):

clipboard_image_2.png

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:

clipboard_image_3.png

 

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.

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
October 16, 2019

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.

clipboard_image_1.png

 

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):

clipboard_image_2.png

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:

clipboard_image_3.png

 

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.

 

fahmed-214-AlexandriteAuthor
14-Alexandrite
October 16, 2019

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