How to Run
After MrMathematica has been installed, start DrScheme and then type in the following expression in the Interaction window:
> (require (lib "mathematica.ss" "mrmathematica"))
MrMathematica will open the Mathematica Kernel at the first call to MathEval. If it fails to find your Mathematica, a dialog will ask you
where it is. (Tip: Under Windows, you can call (MathKernel #"-linkname"
#"C:/Program Files/Wolfram Research/Mathematica/5.1/MathKernel.exe -mathlink")
to avoid the dialog.)
Here are some examples about Integrate:
> (MathEval '(Integrate (/ 1 (+ (expt x 2) 1)) x))
(atan x)
> (MathEval '(Integrate (/ 1 (+ (expt x 2) -1)) x))
(+ (* 1/2 (log (+ -1 x))) (* -1/2 (log (+ 1 x))))
> (define f (matheval '(Integrate (expt x 2) x)))
> f
(* 1/3 (expt x 3))
> (define s (eval `(lambda (x) ,f)))
> (- (s 1) (s 0))
1/3
> (MathEval '(Integrate (expt x 2) (list x 0 1)))
1/3
Finally, exit Mathematica Kernel by
> (MathExit)