MathGroup Archive 2006

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

Search the Archive

Re: Step by Step Annotated Derivations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64515] Re: [mg64505] Step by Step Annotated Derivations
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 20 Feb 2006 06:29:53 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Rob,

Oh, you want a step by step derivation. How about adding annotation to it to
explain each step? We can do your example by using the
Algebra`ExpressionManipulation package, which can be downloaded free from my
web site.

Needs["Algebra`ExpressionManipulation`"]

?EvaluateAt
"EvaluateAt[pos][expr] forces evaluation of expr at the position \
indicated by pos. EvaluateAt[{pos1, pos2, ...}][expr] forces \
evaluation at several positions. EvaluateAt[pos, f][expr] and \
EvaluateAt[{pos1, pos2, ...}, f][expr] evaluates function f on \
specified positions."

?EvaluateAtPattern
"EvaluateAtPattern[pattern, levelspec:\[Infinity], \
functionname:Identity][expr] will evaluate held expressions at the \
positions within the level specification which match the pattern. A \
pure function given by functionname may be applied to the results of \
the evaluations."

Print["Function definition"]
f[x] == x
Print["Limit definition"]
f'[x] == HoldForm[Limit[(f[x + d] - f[x])/d, d -> 0]]
Print["Substituting function definition and simplifying"]
%% // EvaluateAtPattern[f[_], \[Infinity], (# /. f -> (# &)) &]
% // EvaluateAt[{2, 1, 1}]
Print["Evaluating the limit"]
%% // ReleaseHold


Function definition

f[x] == x

Limit definition

Derivative[1][f][x] == HoldForm[Limit[(f[x + d] - f[x])/d, d -> 0]]

Substituting function definition and simplifying

Derivative[1][f][x] == HoldForm[Limit[((d + x) - x)/d, d -> 0]]

Derivative[1][f][x] == HoldForm[Limit[1, d -> 0]]

Evaluating the limit

Derivative[1][f][x] == 1

(I had to copy all the output statements in InputForm. In the actual
notebook they would be formatted and look like regular Mathematica
expressions.)

I do derivations this way all the time. In many cases it is not even
necessary to use the ExpressionManipulation package. It's a great way to
learn and clearly set out the operations.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: Rob [mailto:box2718-news at yahoo.com]
To: mathgroup at smc.vnet.net


My goal is to show algebraic manipulations. I might have a problem like,
"show that the derivative of f(x)=x is f'(x)=1 using the definition of the
derivative," and I need to write something like, (excuse the hybrid
notation)

f'(x_0)=lim_(x->x_0)  (x-x_0)/(x-x_0)
       = lim_(x->x_0) 1
       = 1

My goal is to get equals signs to line up. Unfortunately a major part of the
homework is demonstrating to the grader that I can do algebraic
manipulations like that, so a format like the above would be very helpful.

Rob

"David Park" <djmp at earthlink.net> wrote in message
news:dt6kla$ng2$1 at smc.vnet.net...
> Rob,
>
> I don't understand your equation, but do you mean something like this?
>
> (eqns = {a == x y, a == u/v}) // TableForm
>
> or do you mean a Piecewise function, which is formatted for you?
>
> Generally I wouldn't think it is worth detailed formatting of a GridBox
> for
> a homework assignment.
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>
> From: Rob Munger [mailto:rob.munger at yahoo.com]
To: mathgroup at smc.vnet.net
>
> Hello, all,
>
> I am trying to use Mathematica to typeset homework assignments. I'm trying
> to use GridBoxes to format multi-line equations of the following sort:
> a = b
>  = c
>  = d
>  = e
>  = f
> Because I use formulas like this a lot, it would be nice if I could get
> Mathematica to make the default alignment for the columns of GridBoxes to
> be
> "Left," instead of "Center." However, when I try to use SetOptions to
> accomplish this, I get:
>
> In:
> SetOptions[GridBox,ColumnAlignments->{Left}]
> Options[GridBox,ColumnAlignments]
>
> Out:
> {ColumnAlignments->{Center}}
>
> In:
> SetOptions[GridBox,ColumnAlignments->Left]
> Options[GridBox,ColumnAlignments]
>
> Out:
> {ColumnAlignments->{Center}}
>
> My Mathematica abilities are somewhat limited, so I have no idea what is
> going wrong (or going write, as the case may be). Using Unprotect didn't
> help.
>
> Any ideas?
>
> I'm using Mathematica 5.1.0.0 on WinXP.
>
> Rob
>
>




  • Prev by Date: Re: LeftClick+Shift+Enter Reassign
  • Next by Date: Re: LeftClick+Shift+Enter Reassign
  • Previous by thread: Re: Statistical Analysis & Pattern Matching
  • Next by thread: Code to translate to negative base...