1
$\begingroup$

The goal is to find all the roots of a transcendental equation. I copy a function from stackexchange:

Clear[findRoots]
Options[findRoots] = Options[Reduce];
findRoots[gl_Equal, {x_, von_, bis_}, 
   prec : (_Integer?Positive | MachinePrecision | Infinity) : MachinePrecision, 
   wrap_: Identity, opts : OptionsPattern[]] := 
  Module[{work, glp, vonp, bisp}, 
   {glp, vonp, bisp} = {gl, von, bis} /. r_Real :> SetPrecision[r, prec];
   work = wrap@Reduce[{glp, vonp <= x <= bisp}, opts];
   work = {ToRules[work]};
   If[prec === Infinity, work, N[work, prec]]];

It is a single thread function and slow for large scale computation. My straightforward idea is just cutting the interval to N parts and find roots in each part simultaneously. As a beginner, I need to find the way to realize this parallelization. Can you help me?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.