KReuther

15 Reputation

One Badge

10 years, 219 days

MaplePrimes Activity


These are replies submitted by KReuther

@acer Although I seem to have deleted one physical constant too many in the minimal example... (a_2 is a parameter)

So the problem was primarily the global Digits setting, as I see now.

Your other change has the primary effect to disable all tries to analytically modify the inner integral to enforce numerical calculation.

I am now able to numerically solve 'eq_R'(V,R)=R in dependence of V.

Thank you all! I was able to reproduce all your approaches and got the same results as you. I now do understand that the reason why Maple returns this particular integral unevaluated is that it cannot ensure its required accuracy.

What I do not understand is why this is so. The function (as plotted by Markiyan) can be seen to be smooth and monotonous, with one or two inflection points at most. It exhibits neither fluctuations nor singularities. I would assume it should be possible to obtain a reasonable result with something like 6 digits of accuracy by a simple trapezoidal algorithm. Is there any way of instructing Maple to do so or would I need to implement it myself?

The reason why I ask is this: The integral I posted above is actually part of a root finding problem. Most parameters given in float form are subject to vary by one order of magnitude (or more, depending on the initial physical parameters). When changing these parameters I have observed that even your proposed methods may fail some times.

I already gave up hope to simply feed the root finding problem into fsolve. Instead I will propably implement something like a Newton-Raphson algorithm myself.

I have attached a minimal but complete worksheet (i.e., all pyhsical parameters with their relation to the numerical problem are still inside). Please excuse the mixed layout (Legacy code...). The equation to be solved is the last one. For this, the last but one line has to be evaluated repeatedly. however, the second parameter in eq_R cannot be set to larger than 1e-6 for the given set of parameters, which is just enough for this case. However, with different physical parameters it is not possible to find a solution any more.

Any input in reliably and robustly evaluating this integral by built-in methods, or how to use one of Maples solver algorithms for the root finding problem is appreciated.

CoCu18minimal.mw

 P.S.: "Digits" is initially set to 6 in my given example. I inherited the code and now I see why this restiction would have been put in. That is why all float constants were given only to six digits of precision.

Page 1 of 1