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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

equation solve

fahmed-2
13-Aquamarine

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
Werner_E
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.

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.

 

View solution in original post

2 REPLIES 2
Werner_E
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.

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-2
13-Aquamarine
(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