NonlinearSolvers plugin - BDQRF, Bisection, Brent's, Broyden's, Newton-Raphson, Ridder's, Secant, Homotopy - Messages
PostedSorry Uni, I don't understand your pdfs
I'm sorry, maybe it will be clearer: http://stocktrader10.tripod.com/
QuoteThis Web site is a good spot to let visitors know the math method developed by Russian scientist Anatoly V.Draghilev
This page was last updated on 06/06/02 .
e-mail :Alexey Ivanov [stitch_design@rambler.ru]
Page 1, page 2, page 3, page 4, page 5
Posted
Ioan,
[/b]
Hi Ioan

The HRE functions need 2 arguments, no more (see the attachment).
The initial unknown guess strategy It's a common issue, Homotopy and Bisection I think they are the best approaches.
Note that in your script a "large" bound it's better than a little bound.
best regards,
w3b5urf3r
P.S. in the previous post I've reupdated the plugin, the previous librery have a little issue with the x variable, when already defined
Hi w3b5urf3r,
Thanks for your suggestion.
Due to a wide range of parameters, I followed your suggestion by making two steps:
* one to identify the function sign changing and;
* one for finding the right solution.
I included two home-made routines (see attached file), one based on the chord method and the other based on the Newton (Broyden ?) method.
I called the plugin giving to it my initial guess values, the same as for my routines.
I've seen that for some situations no solution is founded with the plugin, while my routines give enough accurate solution.
Of course, I understand that the main objective of the plugin is the equation systems, but I believe that it could be useful also for the particular case of single equations.
Hoping to be useful.
Best regards,
Ioan
longflamb eq mid.sm (40 KiB) downloaded 47 time(s).
PostedAnd some video:
I do not know how I did miss that on the Russian side![]()
It is very interesting and I will definitely pay more attention to your posted examples.In the meantime, just wanted to ask something. It might be a stupid question, therefore i excuse myself in advance![]()
You solved few nonlinear systems, nonlinear equations, found the function extrema and it looks, how to say, very exotic![]()
As far as understood at a first glance, to realize this method - functions gradients and solving ODE initial value problem is the main constituent and the main problematic part of the method and of the potential plugin. I might be totally wrong, of course because I did not explore it yet.
I do not know how would this method behave with, say 10x10 system of equations? Do you have any experience with something like this?
Regards,
Radovan
One more example, the system was solved by a Draghilev's method for practically all positive (L,x) :
(1+exp(-2*L*x))*cos(L*x)+2*exp(-L*x)=0; http://forum.exponenta.ru/viewtopic.php?p=55406#55406
Excuse me, I do not know English. I think, uni will help me…
Description of the method:
http://forum.exponenta.ru/viewtopic.php?t=3892&start=0&sid=616ac92e0e41288833d51ba26c338d0f
PostedYou solved few nonlinear systems, nonlinear equations, found the function extrema and it looks, how to say, very exotic
![]()
As far as understood at a first glance, to realize this method - functions gradients and solving ODE initial value problem is the main constituent and the main problematic part of the method and of the potential plugin.
Well, I'll explain how it works and what you can do with it. But first I need to finish MapleWrapper plugin.
In order to explain I need the two plugins: ODESolvers and MapleWrapper. One would be to calculate the Jacobian, and the second to solve an ODE. This is not exotic, but rather simple things, as you will see.

I am looking forward to it.
By the way, you know that I appreciate very much that you made ODEsolvers plugin. Hope that you would have the time to add some "stiif" ODE solver in the future.
Wish you all the best and good luck

Regards,
Radovan
PostedHello!
One more example, the system was solved by a Draghilev's method for practically all positive (L,x) :
(1+exp(-2*L*x))*cos(L*x)+2*exp(-L*x)=0; http://forum.exponenta.ru/viewtopic.php?p=55406#55406
Excuse me, I do not know English. I think, uni will help me…
Description of the method:
http://forum.exponenta.ru/viewtopic.php?t=3892&start=0&sid=616ac92e0e41288833d51ba26c338d0f
Uni has promised to help with explanations...
System of equations whose solution is converted into an animation of the mechanism.
x1^2+x2^2+(x3+.5*sin(10*x1)-3)^2-4=0;
x2-x1=0;
x5-x6=0;
x5-3=0;
(x1-x4)^2+(x2-x5)^2+(x3-x6)^2-20.1=0;
Maple.Draghilev's method.

The method you mentioned seems to be the same as the one used in the two pdf papers I linked above, it's an homotopy, differentiated to form an IVP.
One of the pdf I linked contains an implementation of the algorithm solved with classic Runge-Kutta order4 formulas for the IVP (RK4 is said to have a good balance between cost and precision). I'm sure that w3b5rfer might be implementing it for the next version of his plugin.
As for a function for stiff odes, there you have a .NET library (pity it's gpl licensed, at least you can see which algorithms are used).
http://www.dotnumerics.com/NumericalLibraries/DifferentialEquations/Default.aspx
EDIT:
Feel free to contact the author if someone wants to use dotnumerics,
I might be wrong as for the license issues to develop open source plugins for a closed software (though non-comercial) as it is SMath.
EDIT:
I've read that this BDF implementation in C (for Stiff IVP) is good, see "GEAR.H" , "GEAR.CPP" and "MGEAR.CPP"
http://jean-pierre.moreau.pagesperso-orange.fr/c_eqdiff.html
- new feature: solvers for systems of equations now accept multiple unknowns names (introduced in the latest BETA + new fixes);
- Broyden convergence criterion revisited (introduced in the latest BETA);
- added HRE.RK(...) (Homotopy root-estimation method, using the Runge-Kutta 4th order algorithm);
- all homotopy algorithms now works as Broyden() and NewtonRaphson() (4 required arguments and a 5th optional argument - see the attachment);
- previous HRE() renamed as HRE.NR();
- plugin Jacobian(...) unlocked (introduced in the latest BETA + new fixes);
- fixed issues with Units in all HRE() solvers.
regards,
w3b5urf3r
Regards.
Alvaro.
PostedPLUGIN UPDATED :d
- new feature: solvers for systems of equations now accept multiple unknowns names (introduced in the latest BETA + new fixes);
- Broyden convergence criterion revisited (introduced in the latest BETA);
- added HRE.RK(...) (Homotopy root-estimation method, using the Runge-Kutta 4th order algorithm);
- all homotopy algorithms now works as Broyden() and NewtonRaphson() (4 required arguments and a 5th optional argument - see the attachment);
- previous HRE() renamed as HRE.NR();
- plugin Jacobian(...) unlocked (introduced in the latest BETA + new fixes);
- fixed issues with Units in all HRE() solvers.
Just a little bit of testing with one my "nightmare" problem. I've mentioned this example already. I think this is one more of the SMath symbolic engine problem, and it my happen that you can define a vector function but can not obtain the Jacobian of it. See the attached file and the picture. I managed to solve this problem initially with HR.B() to get better guess values and then Broyden() could do the job. As I do not know how to force SMath to perform all the symbolic operations (for instance, all the operations inside stack() function - among other things), it seems that HR.B() and Broyden() in these situations are the only way of performing similar things . At the end of the file I did all the things about defining the function manually, and then the situation changed drastically. Anyway, I am satisfied that some progress has been made about this

Regards,
Radovan
I've seen you're example, unfortunately there are many little "issues" regarding the symbolic engine...
For example observes the first element of your f1(), f2() and f3() (look the attachments);
f1()
SMath seem unable to make a symbolical stack of the function; It's not difficult to understand why... the columns of the results matrix (if all it's correct) are the columns of the last stack argument -> 1; the rows are undefined because if [MATH lang=eng]el(X#,2)[/MATH],[MATH lang=eng]el(X#,4)[/MATH],[MATH lang=eng]el(X#,5)[/MATH] and [MATH lang=eng]el(X#,3)[/MATH] are vectors, the result is a vector... exluding the assumption that all unknown elements are numbers or a "size predeclaring", probably the issue could be solved using a "trial and error" procedure on the unknown size, but I think it's a very hard task

f2()
Here there are SMath issues with derivatives... probably it's the same issue of f3() (and the same of this bug), IMHO all related to the symbolic simplification engine...
f3()
Here there are SMath issues with derivatives and elements...
Since all the issues with derivatives involving the Jacobian, so NewtonRaphson(), HRE.NR() and HRE.RK() in this example can not be used (at the moment, at least)

PostedFor bisection maybe is better not having both epsilon and maxiters, with only one is enough
I don't agree, because with discontinuous functions (f.e. tan(x)) the maxiters prevents infinite loops.


regards,
w3b5urf3r
Primer4.7w-debug.sm (145 KiB) downloaded 38 time(s).
Thank you for your answer an I agree with you completely. We also can see that many of us on this Forum have to many "why?" regarding symbolic engine

To be honest, Mathcad drives me crazy for almost 25 years

Regards,
Radovan
Posted
PostedFor bisection maybe is better not having both epsilon and maxiters, with only one is enough
I don't agree, because with discontinuous functions (f.e. tan(x)) the maxiters prevents infinite loops.![]()
w3b5urf3r
Epsilon and maxiters for bisection is redundant. Even it's more easy with maxiters, is better to take Epsilon (one for each axis, but that is not related with maxiters redundance). In the code maxiters is calculated as N. Actually, the main loop can be implemented with a for loop.
Regards.
Alvaro.
Do you think these methods based on bisection could be useful for non-linear systems ?
They don't need differentiability of function, and convergence is guaranteed.
This is a generalized bisection which could be used like HRE for initial root estimation:
https://dl.dropbox.com/u/3152568/A%20Rapid%20Generalized%20Method%20of%20Bisection%20for.pdf
This is a minimization algorithm based on bisection which is said to be an alternative to Nelder-Mead
https://dl.dropbox.com/u/3152568/A%20Multidimensional%20Bisection%20Method_E.Y.Morozova.pdf
PostedEpsilon and maxiters for bisection is redundant. Even it's more easy with maxiters, is better to take Epsilon (one for each axis, but that is not related with maxiters redundance). In the code maxiters is calculated as N. Actually, the main loop can be implemented with a for loop.
Regards.
Alvaro.
Ahhhh, previously I understood that you wanted to remove completely (in the function) the maxiter, not to replace it with the number of iterations provided... you're right, excuse me

BTW the plugin single equations solvers actually supports the 2nd Epsilon, but I have not yet updated the reference sheets.
regargds,
w3b5urf3r
-
New Posts
-
No New Posts