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

Lucas, Mark lon-capa-users@mail.lon-capa.org
Wed, 9 Mar 2011 13:03:19 -0500


--_000_128D613BA62B495C8E386C1AEF6C5E04ohioedu_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Is it possible to include a library file via a style file?

This could then be course dependent.

While a bit non-standard, one could also define a parameter that is used in=
 a library
(ExpandedFunctions, for example) that each problem is coded to check before=
 implementing
some feature.

Later,
Mark

On Mar 9, 2011, at 12:42 PM, Todd Ruskell wrote:

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.  I=
t'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<mailto:jgray=
@math.sfu.ca>> wrote:
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:

ln(x):=3Dlog(x);

A colleague asked me today whether it was possible to make these definition=
s more globally, at the course level for example, so that these user-define=
d functions would not need to be coded separately into each problem. I thin=
k the answer is no. Is that correct?

It occurs to me that other domains that want to use these resources might n=
ot want user-defined functions hard-coded in the problems if there was an o=
ption to set this at the course level, much like the display of math equati=
ons.

Thanks,
Justin

Justin Gray | Senior Lecturer
Department of Mathematics | Simon Fraser University
8888 University Drive, Burnaby | V5A 1S6 | Canada
Tel: +1 778.782.4237







--
Mark Lucas  email: lucasm@ohiou.edu<mailto:lucasm@ohiou.edu>
252D Clippinger Lab phone: (740)597-2984
Department of Physics and Astronomy fax: (740)593-0433
Ohio University
Athens, OH 45701


--_000_128D613BA62B495C8E386C1AEF6C5E04ohioedu_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode:=
 space; -webkit-line-break: after-white-space; ">Is it possible to include =
a library file via a style file?<div><br></div><div>This could then be cour=
se dependent.</div><div><br></div><div>While a bit non-standard, one could =
also define a parameter that is used in a library</div><div>(ExpandedFuncti=
ons, for example) that each problem is coded to check before implementing</=
div><div>some feature.</div><div><br></div><div>Later,</div><div>Mark</div>=
<div><br></div><div><div><div>On Mar 9, 2011, at 12:42 PM, Todd Ruskell wro=
te:</div><br class=3D"Apple-interchange-newline"><blockquote type=3D"cite">=
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.&nbsp; It'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,&nbsp;at the course level&nbsp;for exam=
ple, so that these user-defined functions would not need to be coded separa=
tely into 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>
</blockquote></div><br><div>
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; color:=
 rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: norma=
l; font-variant: normal; font-weight: normal; letter-spacing: normal; line-=
height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transf=
orm: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-borde=
r-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-te=
xt-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-tex=
t-stroke-width: 0px; "><div>--&nbsp;<br>Mark Lucas<span class=3D"Apple-conv=
erted-space">&nbsp;</span><span class=3D"Apple-tab-span" style=3D"white-spa=
ce: pre; ">								</span>email:&nbsp;<a href=3D"mailto:lucasm@ohiou.edu">l=
ucasm@ohiou.edu</a><br>252D Clippinger Lab<span class=3D"Apple-tab-span" st=
yle=3D"white-space: pre; ">						</span>phone: (740)597-2984<br>Department =
of Physics and Astronomy<span class=3D"Apple-tab-span" style=3D"white-space=
: pre; ">		</span>fax: (740)593-0433<br>Ohio University<br>Athens, OH 45701=
</div></span>
</div>
<br></div></body></html>=

--_000_128D613BA62B495C8E386C1AEF6C5E04ohioedu_--