Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Assigning (really dumb question)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60994] Re: [mg60988] Assigning (really dumb question)
  • From: Andrzej Kozlowski <andrzej at yhc.att.ne.jp>
  • Date: Fri, 7 Oct 2005 03:37:39 -0400 (EDT)
  • References: <200510060808.EAA08545@smc.vnet.net>
  • Reply-to: Andrzej Kozlowski <andrzej at akikoz.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The output of Solve, (qa) ia already a list of rules so q->qa is not  
what you want. Just use r[q]/.qa etc.

Andrzej Kozlowski



On 6 Oct 2005, at 17:08, vjp2.at at at.BioStrategist.dot.dot.com wrote:

> What the heck am I doing wrong? I've been away from Mathematica for  
> a while.
>
> I can't get it to evaluate the expressions at the solved values.
>
> I feel so stupid.
>
> r[q_] := 1800 q - .006 q^2
> c[q_] := 12100000 + 800 q + .004 q ^2
>
> qa = Solve[ D[ r[q]-c[q] , q] == 0, q]
> r[q] /. q -> qa
> c[q] /. q -> qa
> r[q]-c[q] /. q -> qa
> D[r[q],q] /. q -> qa
> D[c[q],q] /. q -> qa
>
> qm = Solve[ c[q]/q - D[c[q] , q] == 0, q] [[2]]
> r[qm] /. q -> qm
> c[qm] /. q -> qm
> r[qm]-c[qm] /. q -> qm
> D[r[q],q] /. q -> qm
> D[c[q],q] /. q -> qm
>
>
> (PS, a while back I was asking how to fix DOS 2.2.2 when it wasn't
> doing graphics and I was told it was no longer supported. Well, 2yrs
> later, dumbo me, realised I just had to cd into the math directory and
> all was fine.)
>
>
>                 - = -
>     Vasos-Peter John Panagiotopoulos II, Columbia'81+, Bio$trategist
>           BachMozart ReaganQuayle EvrytanoKastorian
>        http://ourworld.compuserve.com/homepages/vjp2/vasos.htm
>   ---{Nothing herein constitutes advice.  Everything fully  
> disclaimed.}---
>    [Homeland Security means private firearms not lazy obstructive  
> guards]
>  [Fooey on GIU,{MS,X}Windows 4 Bimbos] [Cigar smoke belongs in veg  
> food group]
>
>


  • Prev by Date: Re: Assigning (really dumb question)
  • Next by Date: StyleBox["A","MB"],RowBox[{"rrow3D",... inserted into Arrow3D[...]
  • Previous by thread: Re: Assigning (really dumb question)
  • Next by thread: Re: Assigning (really dumb question)