Re: What's in an expression?

• To: mathgroup at smc.vnet.net
• Subject: [mg132441] Re: What's in an expression?
• From: David Bailey <dave at removedbailey.co.uk>
• Date: Mon, 17 Mar 2014 02:27:11 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-outx@smc.vnet.net
• Delivered-to: mathgroup-newsendx@smc.vnet.net
• References: <lfjtmt\$hj2\$1@smc.vnet.net>

```On 10/03/2014 08:38, sam.takoy at yahoo.com wrote:
> Hi all,
>
> I'm building a little Mathematica system that checks answers entered by students. Suppose the question is "what is Sin'[x]?" ad the student responds: Sin'[x] which is "correct", but not the intended answer (Cos[x]). I'm wondering if there is a general way to approach this sort of problem. In particular, is there a way to find out whether a given expression includes certain elements (like Derivative)?
>
>
> Sam
>
Of course, you can search an expression for particular symbols, e.g.
FreeQ[Hold[Sin'[x]], Derivative]

(Note that you need the Hold, otherwise Mathematica will do the
evaluation itself!)

This leads me to the obvious question as to how you will prevent
students using Mathematica to obtain the answers anyway!

I can't help thinking there are much more inspiring ways to use
Mathematica to teach!

David Bailey
http://www.dbaileyconsultancy.co.uk

```

• Prev by Date: Re: Do we need a When function?
• Next by Date: Mapping tag-value lists to a third
• Previous by thread: Re: What's in an expression?
• Next by thread: What comes on the media kit DVD?