Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Plot[f, {x,a,b] vs Plot[{f},[x,a,b]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50640] Plot[f, {x,a,b] vs Plot[{f},[x,a,b]
  • From: dgurney at stanford.edu (Derek)
  • Date: Wed, 15 Sep 2004 01:49:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I am getting different results when I use Plot[f, {x,a,b] vs
Plot[{f},[x,a,b] (the difference being the {f}), where f is a fairly
complex function. The difference is important because Plot[f] gives
the correct results but I want to be able to plot multiple functions
i.e. Plot[{f,y},{x,a,b}]

My code is below; any comments appreciated.

Derek

-----

Clear["Global`*"]
R2 := R1 + \[Gamma] (qj2 + (n - 1)qJ2)
P2 := (1 - R2 o\[Beta] )a - 
    b(qj2 + (n - 1)qJ2)
revj2 := P2 qj2
profitj2 := revj2 - c qj2 - oF
profit2 := n profitj2
CS2 := Integrate[(1 - R2)a - b s, {s, 0, n qj2}] - n revj2
W2 := CS2 + profit2 

mqj2opt := qj2 /. Solve[(D[profitj2, qj2] /. qJ2 -> qj2) == 0, qj2]
mW20A := Simplify[
    W2  /. qJ2 -> qj2 /.  qj2 -> (mqj2opt /. o\[Beta] -> 1) /.  
      o\[Beta] -> 1]
mneqmAA := 
  n /. Last[
      Simplify[Solve[(profitj2 /. qJ2 -> qj2 /. 
                  qj2 -> (mqj2opt /. o\[Beta] -> 1) /. o\[Beta] -> 1)
== 0, 
          n]]]
mW2AA := Simplify[mW20A /. n -> (mneqmAA) ]


a = 1;
b = 0.5;
c = 0;
oF = 0.1;

Plot[Evaluate[mW2AA /. R1 -> 0], {\[Gamma], 0, 1}]
Plot[{Evaluate[mW2AA /. R1 -> 0]}, {\[Gamma], 0, 1}]


  • Prev by Date: creating help topic
  • Next by Date: Re: more than 1 function with Plot3D
  • Previous by thread: Re: creating help topic
  • Next by thread: Re: Plot[f, {x,a,b] vs Plot[{f},[x,a,b]