Tag Info

New answers tagged

3

Adding to Szabolcs's answer, it's better to use ExtendedDefinition instead of ExtendedFullDefinition. In situation in which old symbol (the one that we want to copy), depends on anotherSymbol and anotherSymbol has old symbol somewhere in it's ...Values e.g.: ClearAll[new, old, anotherSymbol] old = anotherSymbol anotherSymbol[] := 2 old Full definition of ...


0

Calculation of R involves general recursion that is not optimized in Mathematica. Try to use memoisation to avoid stack bloat when calculate R functions. R is defined recursively and recursive calls are not even in the tail position. Another advice - look at using Compile for your numeric functions.


3

Your second solution can be improved by Evaluate[] on the first plot argument. Plot[Evaluate[y /. sol], {x, -10, 10}, PlotLegends -> Automatic]



Top 50 recent answers are included