MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: What's in an expression?

  • To: mathgroup at
  • Subject: [mg132441] Re: What's in an expression?
  • From: David Bailey <dave at>
  • Date: Mon, 17 Mar 2014 02:27:11 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <lfjtmt$hj2$>

On 10/03/2014 08:38, sam.takoy at 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)?
> Thank you in advance,
> 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

  • 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?