Skip to main content
1-Visitor
January 22, 2021
Solved

solve function without a symbolic answer

  • January 22, 2021
  • 2 replies
  • 4762 views

is there a way you can make solve not make the symbolic answer and go directly to the numeral solution. when i turn in rapports is seems unnecessary to include it. i linked an example. just to be clear i want the big unusable chunk in the middle out.

maggen_0-1611328968111.png

 

Best answer by LucMeekes

Yes it is possible to get a numeric answer straight away. There are two options:

1.

Define C() as a function of all (other) symbols in the expression, and use the symbolic solve to get its expression.

The call C() with the actual numerical values supplied as arguments, in numerical evaluation.

Here's an example:

LucMeekes_0-1611334866050.png

 

2.

Use not the symbolic solve but use the numeric root() function.

 

 

Success!

Luc

2 replies

LucMeekes23-Emerald IVAnswer
23-Emerald IV
January 22, 2021

Yes it is possible to get a numeric answer straight away. There are two options:

1.

Define C() as a function of all (other) symbols in the expression, and use the symbolic solve to get its expression.

The call C() with the actual numerical values supplied as arguments, in numerical evaluation.

Here's an example:

LucMeekes_0-1611334866050.png

 

2.

Use not the symbolic solve but use the numeric root() function.

 

 

Success!

Luc

maggen1-VisitorAuthor
1-Visitor
January 22, 2021

how would the root function look for this because i cant seem to make it work

 

25-Diamond I
January 22, 2021

I guess that the use of the root function as suggested by Luc seems to be the most straight forward way.

His functional approach is the way I would prefer, though.

 

If you want to use the symbolic "solve" the way you did, you should use additional the "simplify" command.

Furthermore it looks like you ran into a problem with Primes infamous autolabeling - the various Omega seems to be labelled differently as otherwise the symbolic (which does not know anything about units) would collect and/or cancel them.

It also seems that you don't use units consequently as C comes out dimensionless in your picture. Or you didn't use any units at all and your Omega was meant to be a lower case omega (s = j*omega) ?

 

A word of caution: When using symbolic evaluation you should use the modifier "float" with great care, because it not only affects the display of the result but also limits the precision of the whole calculation!

You may consider posting the worksheet.

maggen1-VisitorAuthor
1-Visitor
January 22, 2021

i tried to use units in the function altogether but that wouldnt work so i ended up removing the units from all of them and then manually putting units on C to get units on the result. but anyway here is the sheet

 

25-Diamond I
January 22, 2021

If you work with units, then s must be of dimension frequency, unit Hz or 1/s

And you'll have to check your equations, especially:

Werner_E_0-1611341640333.png

As r is a length (9 cm), you can't add it to a scalar (10*1=10).