How to solve these types of equations

How to solve these types of equations - Messages

#1 Posted: 3/29/2021 4:04:19 PM
sando99

sando99

0 likes in 12 posts.

Group: User

How can I find "P4" if I know "P1, P2 and P3" without having to manually write the expression for "P4"? Thanks!


#2 Posted: 3/29/2021 4:25:23 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Try it with integrated solve() function. Or you can try to solve with maple plugin.
However you have to consider the default root limits with integrated solve().
The limits are -20..20 but you can change it from options.
And even better, you can define the limits while you are writing the function.

Regards.

2021-03-29_22-24.png
#3 Posted: 3/29/2021 4:53:03 PM
sando99

sando99

0 likes in 12 posts.

Group: User

Wrote

Try it with integrated solve() function. Or you can try to solve with maple plugin.
However you have to consider the default root limits with integrated solve().
The limits are -20..20 but you can change it from options.
And even better, you can define the limits while you are writing the function.



Regards.

Thank you, you shed some light upon my problem! Couple of questions, though:

Here is what I get with a bit more complicated equation using the integrated solve() (I already calculated the answer by hand and the root is way above the "Root limit (1000))":





Maple seems to do the trick, thank you a lot!:





1. The integrated function solve() has roots limit from -1000 to 1000, so it won't show bigger or smaller roots?
2. Having said that there are limits, does this mean you have to roughly guess the value of the equation's roots when using integrated solve()?
#4 Posted: 3/29/2021 5:17:10 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Integrated solve() function can not do calculation with units.
Solution has to be pure numbers, because this function iterates with numbers.
However, in some cases you can trick the function to solve with units.
Just adding units to key places will make expression unitless.
This will cause the solve() function operate as designated.

For your other question, solve() will calculate if root is over 1000,
if you had specified the lower and upper limit within the function.
Without entering the limits into function, roots finding is limited to... well, limits.

Maple can calculate with units as far as I know.
However maybe there are be some cases which it couldn't.
But I have not encountered any with my simple engineering calculations.

Regards

2021-03-29_23-05.png

2021-03-29_23-08.png
#5 Posted: 3/29/2021 5:31:04 PM
sando99

sando99

0 likes in 12 posts.

Group: User

Wrote

Integrated solve() function can not do calculation with units.
Solution has to be pure numbers, because this function iterates with numbers.
However, in some cases you can trick the function to solve with units.
Just adding units to key places will make expression unitless.
This will cause the solve() function operate as designated.

For your other question, solve() will calculate if root is over 1000,
if you had specified the lower and upper limit within the function.
Without entering the limits into function, roots finding is limited to... well, limits.

Maple can calculate with units as far as I know.
However maybe there are be some cases which it couldn't.
But I have not encountered any with my simple engineering calculations.

Regards




Thank you very much for the clear and understandable explanation. I think that for my calculations Maple will do the job, so I'll refrain from using the integrated solve() function (not that it's bad, it just seems unnecessary to trick it when you can use Maple with units).

Stay safe.

#6 Posted: 3/29/2021 5:35:40 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

There are also root() and FindRoot() functions.
root() is same with solve (so to speak) but without range limits.

You can also use FindRoot to solve with units.
You only have to give it some starting point.
Usually a humble guess should suffice.

Look at the examples below

Regards.

2021-03-29_23-32.png

2021-03-29_23-32_1.png
#7 Posted: 3/30/2021 8:28:41 AM
sando99

sando99

0 likes in 12 posts.

Group: User

Wrote

There are also root() and FindRoot() functions.
root() is same with solve (so to speak) but without range limits.

You can also use FindRoot to solve with units.
You only have to give it some starting point.
Usually a humble guess should suffice.

Look at the examples below

Regards.



I'm having a bit of a difficult time using the FindRoot () function.
It just doesn't appear in the menu. Is it a part of some plugin?


#8 Posted: 3/30/2021 11:46:23 AM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Wrote

I'm having a bit of a difficult time using the FindRoot () function.
It just doesn't appear in the menu. Is it a part of some plugin?


It is in Nonlinear Solver plugin. If you have not, you need to install it.
FindRoot() has a bug which it prevents to assign a variable and show result in same line.
It makes the calculation, can't show the result but assign to variable.
Actually you don't have to assign to variable with it, direct function automatically assign.

See example below, regards.

2021-03-30_17-45.png
#9 Posted: 3/30/2021 6:43:35 PM
sando99

sando99

0 likes in 12 posts.

Group: User

.
#10 Posted: 4/1/2021 7:26:45 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I'm having a bit of a difficult time using the FindRoot () function.


Accurate from FindRoot(3) ... algebra.

Algebra.PNG

#11 Posted: 4/18/2021 3:51:15 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

I'm having a bit of a difficult time using the FindRoot () function.


Accurate from FindRoot(3) ... algebra.

Algebra.PNG



:d Give me similar solutions for this one:


Multiple errors and I have no idea how to deal with them.

See attached smath file. Thanks.Equation Solving Issues.sm (12 KiB) downloaded 55 time(s).
#12 Posted: 4/18/2021 4:16:16 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1675 posts.

Group: User

Wrote

...
Multiple errors and I have no idea how to deal with them.



Hi. Use vectorize and see that you try to define solve ( := ), not evaluate it ( = )

Clipboard02.jpg

Best regards.
Alvaro.
#13 Posted: 4/18/2021 4:43:49 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

...
Multiple errors and I have no idea how to deal with them.



Hi. Use vectorize and see that you try to define solve ( := ), not evaluate it ( = )

Clipboard02.jpg

Best regards.
Alvaro.



Oops, newbie's mistake. Thank you.

How's about other solving options? Why do they have errors?
#14 Posted: 4/18/2021 5:08:37 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Give me similar solutions for this one:


I don't understand much in there.

Unknown.PNG
#15 Posted: 4/18/2021 5:19:28 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

Give me similar solutions for this one:


I don't understand much in there.

Unknown.PNG



Sorry. I was kidding that you could give a very simple solution for my issues which can be very trivia.

Anyway, plotting equations is very helpful. I need to learn this trick.
#16 Posted: 4/19/2021 1:33:45 AM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

I have another newbie's question:

If I have two non-linear equations with 2 unknowns x,y: f(x,y)=0 and g(x,y)=0. I know there are real roots and the ranges of the roots. How can I solve these in Smath?

Thanks,
#17 Posted: 4/19/2021 8:38:47 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

If I have two non-linear equations with 2 unknowns x,y: f(x,y)=0 and g(x,y)=0. I know there are real roots and the ranges of the roots. How can I solve these in Smath?



1.f(x,y)=0 and g(x,y)=0 are implicit [= 0] in mathematical definition.
2. That they have real roots, you can't know in advance.
3. Solving in there means solving for their intersection
4. Visit this triplet solved.
Cheers ... Jean ... give your functions..

Contour SOLVE AstroidHyperbola.sm (22 KiB) downloaded 66 time(s).
#18 Posted: 4/19/2021 12:29:42 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Wrote

I have another newbie's question:

If I have two non-linear equations with 2 unknowns x,y: f(x,y)=0 and g(x,y)=0. I know there are real roots and the ranges of the roots. How can I solve these in Smath?

Thanks,


You can check the example below.
Regards

nonlinear.sm (21 KiB) downloaded 70 time(s).

nonlinear.png
#19 Posted: 4/19/2021 2:26:45 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

It should be careful if the equations are a bit more complicated.

As far as I know, al_nleqsolve() is the only solver in SMath which will solve nonlinear equations in a pure numerical fashion (excluding solvers from Maxima and Maple plugins).

This "numerical thing" was mentioned here many times - maybe to many.

Regards,
Radovan
[nonlinear-alglib.sm].png
nonlinear-alglib.sm (12 KiB) downloaded 89 time(s).



When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#20 Posted: 4/19/2021 4:10:08 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Solve ADVANCE accurate-granular USER Iter.sm (11 KiB) downloaded 113 time(s).
  • New Posts New Posts
  • No New Posts No New Posts