## 98 Reputation

19 years, 278 days

## Including Maple input/output in LaTeX...

Maple

I know this is a LaTeX question, rather than a Maple question, but I imagine there's somebody in these here parts who may be able to help...

I'm writing some student notes (using LaTeX) about the use of Maple, and I have several blocks of Maple commands interspersed with their outputs.  I'd like the commands to be typeset verbatim, and the outputs using displayed typeset mathematics.  Also I'd like the whole block to have a gray background.

## An error message from a backtracking pro...

Maple

I'm experimenting with a backtracking procedure to solve the subset-sum problem: given a list L of integers, and an integer N not in L, to see if elements of L can be found which sum to N.  Basically the procedure works recursively, adding elements to the current list until either the sum equals N, in which case we stop with a solution, or the sum exceeds N, in which case we go back one level:

## Blank worksheets in Maple 12/linux?...

Maple

I've just installed Maple 12 on my machine running Suse 10.0, under which Maple 10 ran with no problems.  But I have two problems here: even on a newly opened worksheet, in a newly opened Maple, a simple command, such as

f:=x/(x^7+1);

takes several seconds to "evaluate", while the screen goes completely blank.  The problem is even worse if the evaluation is a difficult problem.

What seems to make it worse is if I've read in some Maple files before with

A colleague asked me about this, and I couldn't help him: ``` > g:=y+exp(2*t): > y2:=subs([y=3,t=0.1],g); y2 := 4.221402758 > subs([y=y2,t=0.1],g); 4.221402758 ``` Why has not the new value of y2 been substituted for y in this last expression? And the same thing happens for eval. Thanks, Alasdair