MathGroup Archive 2010

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

Search the Archive

Re: Displaying Equations Symbolically and Numerically

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114778] Re: Displaying Equations Symbolically and Numerically
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Thu, 16 Dec 2010 05:57:20 -0500 (EST)
  • References: <ieadkv$r9h$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 12/15/2010 4:51 AM, Gregory Lypny wrote:
> Hello everyone,
>
> I would like to be able to display equations for my students in symbolic
> form on the left side and with the numbers plugged in on the right side
> but am not quite sure how to do it programmatically.  Suppose my
> equation in "symbolic" form is
>
> 	sqrt(x^(a+b)) + c ln(d/e)
>
> I know I can make it look like real math by having it displayed as
> TraditionalForm.  However, I also want to display the solution with
> particular values for the variable x and the parameters a, b, c, d, and
> e slotted in, something like
>
> 	sqrt(x^(a+b)) + c ln(d/e) = sqrt(9^(2+1)) + 4 ln(32/8) = answer
>
> to recognize that some students may be a little rusty at simplifying on
> the fly.   Wrapping the whole package in Manipulate would put the icing
> on the cake.
>
> Any tips on how apply the appropriate styles would be most appreciated.
>
> Regards,
>
> Gregory
>
>
>

May be try this? using HoldForm? or some variation of this:

eq  = HoldForm[Sqrt[x^(a+b)]+c Log[d/e]];
eq2 = eq/.{x->9,a->2,b->1,c->4,d->32,e->8};

eq==eq2

Sqrt[x^(a+b)]+c Log[d/e]==Sqrt[9^(2+1)]+4 Log[32/8]


--Nasser


  • Prev by Date: Re: Plotting anomaly with a staircase function
  • Next by Date: Re: Displaying Equations Symbolically and Numerically
  • Previous by thread: Displaying Equations Symbolically and Numerically
  • Next by thread: Re: Displaying Equations Symbolically and Numerically