## 55 Reputation

4 years, 147 days

## Using dsolve events to avoid singulariti...

Maple 2016

Hey there,

I'm trying to numerically intergrate a function s(K,i,j) dK using runge kutta over a 2D grid of i,j values. Essentialy, performing the same sort of integral many different times for slightly different combinations of i and j. The function is more or less gaussian, and so the bulk of the result will come from the values of K around the peak of said gaussian. For some combinations of i and j, the function seems to have a singularity on the right edge of the gaussian peak, which causes my script to spit out an error, telling me the calculation cannot be performed further to the right past the singularity. Now, like i said before, the singularity is on the very edge of the gaussian and therefore I am perfectly happy to stop the integration before the singularity, because anything past it wont contribute very much to the result.

How can I use dsolve events to halt my integration just before hitting the singularity?

`RK := (i, j) -> dsolve({diff(n(K), K) = K*s(K, a[i], b[j]), n(0) = 0}, numeric, method = rkf45)`

## How to save all maple variables for use ...

Maple

After a lengthy series of calculations, I would like to save all the variables and matrices I've constructed for use in a) a seperate window, and b) for a fututre session after closing and reopening maple. I don't want to have to perform the calculations each time I open maple.

Thanks!

 1 2 3 Page 3 of 3
﻿