Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Error using the 'solve' function
Replies: 2   Last Post: Dec 27, 2013 3:34 PM

 Messages: [ Previous | Next ]
 Alan Weiss Posts: 1,430 Registered: 11/27/08
Re: Error using the 'solve' function
Posted: Dec 27, 2013 2:11 PM

On 12/27/2013 1:26 PM, Gara wrote:
> I'm trying to solve an equation but Matlab is giving me this error
> message:
> Warning: Explicit solution could not be found.

>> In solve at 81
> In gara at 3
>
> I don't understand it and I don't know how to fix it
>
> syms D
> eqn=('(D^3)=((16)/(pi*190*((1-(D/58))^4)))*(sqrt((399.64^2)+(379.33^2)))');
>
> A=solve(eqn, D);
>

"D" is used as a differential operator, so perhaps it is not a good idea
to use it as a variable.
Also, when you use a string expression for an equation, I believe that
the symbolic variable is not used. So I ran the following slightly
different commands:

syms D1 % D1 not D
eqn=((D1^3)-((16)/(pi*190*((1-(D1/58))^4)))*(sqrt((399.64^2)+(379.33^2))));
% I replaced the = with a -
A=solve(eqn, D1) % worked just fine

A =

63.079867300777110575867980436609
2.6087921602200828588643773225601
52.14008016362740012559841123103
- 1.2823774635012483818192063508194 - 2.0063893969527284824291415300245*i
58.36800765118895160165382185572 + 5.3548966432721055265970412913235*i
58.36800765118895160165382185572 - 5.3548966432721055265970412913235*i
- 1.2823774635012483818192063508194 + 2.0063893969527284824291415300245*i

Alan Weiss
MATLAB mathematical toolbox documentation

Date Subject Author
12/27/13 Gara
12/27/13 Alan Weiss
12/27/13 Gara