[LON-CAPA-users] default user-defined functions in Maxima?

Todd Ruskell lon-capa-users@mail.lon-capa.org
Wed, 9 Mar 2011 10:42:36 -0700


--0016e6d99b9c2a1dce049e104100
Content-Type: text/plain; charset=ISO-8859-1

Justin,

You might want to look into the possibility of making a .library file that
contains your definitions and then import the library into each problem.
It's not exactly what you want, but it might help.

Todd

On Tue, Mar 8, 2011 at 3:26 PM, Justin Gray <jgray@math.sfu.ca> wrote:

> When coding mathresponse problems, I typically allow students to use
> notation that Maxima would not normally recognize by creating user-defined
> functions in the answer algorithm, for example:
>
> ln(x):=log(x);
>
> A colleague asked me today whether it was possible to make these
> definitions more globally, at the course level for example, so that these
> user-defined functions would not need to be coded separately into each
> problem. I think the answer is no. Is that correct?
>
> It occurs to me that other domains that want to use these resources might
> not want user-defined functions hard-coded in the problems if there was an
> option to set this at the course level, much like the display of math
> equations.
>
> Thanks,
> Justin
>
> Justin Gray | Senior Lecturer
> Department of Mathematics | Simon Fraser University
> 8888 University Drive, Burnaby | V5A 1S6 | Canada
> Tel: +1 778.782.4237
>
>
>
>
>
>

--0016e6d99b9c2a1dce049e104100
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Justin,<br><br>You might want to look into the possibility of making a .lib=
rary file that contains your definitions and then import the library into e=
ach problem.=A0 It&#39;s not exactly what you want, but it might help.<br>
<br>Todd<br><br><div class=3D"gmail_quote">On Tue, Mar 8, 2011 at 3:26 PM, =
Justin Gray <span dir=3D"ltr">&lt;<a href=3D"mailto:jgray@math.sfu.ca">jgra=
y@math.sfu.ca</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204)=
; padding-left: 1ex;">
When coding mathresponse problems, I typically allow students to use notati=
on that Maxima would not normally recognize by creating user-defined functi=
ons in the answer algorithm, for example:<div><br></div><div>ln(x):=3Dlog(x=
);</div>


<div><br></div><div>A colleague asked me today whether it was possible to m=
ake these definitions more globally,=A0at the course level=A0for example, s=
o that these user-defined functions would not need to be coded separately i=
nto each problem. I think the answer is no. Is that correct?</div>


<div><br></div><div>It occurs to me that other domains that want to use the=
se resources might not want user-defined functions hard-coded in the proble=
ms if there was an option to set this at the course level, much like the di=
splay of math equations.</div>


<div><br></div><div>Thanks,</div><div>Justin<br clear=3D"all"><div><br></di=
v><div>Justin Gray | Senior Lecturer</div>Department of Mathematics | Simon=
 Fraser University<br>8888 University Drive, Burnaby | V5A 1S6 | Canada<br>


Tel: +1 778.782.4237<br><br><div><br></div><div><br><div><br></div></div><b=
r>
</div>
</blockquote></div><br>

--0016e6d99b9c2a1dce049e104100--