How to solve these types of equations

How to solve these types of equations - Сообщения

#1 Опубликовано: 29.03.2021 16:04:19
sando99

sando99

0 сообщений из 12 понравились пользователям.

Группа: User

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


#2 Опубликовано: 29.03.2021 16:25:23
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 29.03.2021 16:53:03
sando99

sando99

0 сообщений из 12 понравились пользователям.

Группа: 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 Опубликовано: 29.03.2021 17:17:10
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 29.03.2021 17:31:04
sando99

sando99

0 сообщений из 12 понравились пользователям.

Группа: 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 Опубликовано: 29.03.2021 17:35:40
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 30.03.2021 08:28:41
sando99

sando99

0 сообщений из 12 понравились пользователям.

Группа: 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 Опубликовано: 30.03.2021 11:46:23
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: 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 Опубликовано: 30.03.2021 18:43:35
sando99

sando99

0 сообщений из 12 понравились пользователям.

Группа: User

.
#10 Опубликовано: 01.04.2021 07:26:45
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

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


Accurate from FindRoot(3) ... algebra.

Algebra.PNG

#11 Опубликовано: 18.04.2021 15:51:15
Tuan Nguyen

Tuan Nguyen

0 сообщений из 16 понравились пользователям.

Группа: 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 КиБ) скачан 34 раз(а).
#12 Опубликовано: 18.04.2021 16:16:16
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: 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 Опубликовано: 18.04.2021 16:43:49
Tuan Nguyen

Tuan Nguyen

0 сообщений из 16 понравились пользователям.

Группа: 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 Опубликовано: 18.04.2021 17:08:37
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Give me similar solutions for this one:


I don't understand much in there.

Unknown.PNG
#15 Опубликовано: 18.04.2021 17:19:28
Tuan Nguyen

Tuan Nguyen

0 сообщений из 16 понравились пользователям.

Группа: 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 Опубликовано: 19.04.2021 01:33:45
Tuan Nguyen

Tuan Nguyen

0 сообщений из 16 понравились пользователям.

Группа: 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 Опубликовано: 19.04.2021 08:38:47
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 45 раз(а).
#18 Опубликовано: 19.04.2021 12:29:42
overlord

overlord

552 сообщений из 1332 понравились пользователям.

Группа: 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 КиБ) скачан 47 раз(а).

nonlinear.png
#19 Опубликовано: 19.04.2021 14:26:45
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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 КиБ) скачан 66 раз(а).



When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#20 Опубликовано: 19.04.2021 16:10:08
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Solve ADVANCE accurate-granular USER Iter.sm (11 КиБ) скачан 93 раз(а).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений