Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

RE: Why these graphs differ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33946] RE: [mg33925] Why these graphs differ?
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Wed, 24 Apr 2002 01:21:57 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

The first form (without Evaluate) is not explicitly a function of z ---
where z appears in the expression, it is actually a dummy variable.
Plot holds its first argument unevaluated, so there's no unbound "z" in
the function expression to match the iterator in Plot.  Even if the
first form DID work for you, it would be horrifically slow, as DSolve
would be invoked repeatedly, for each point in the Plot.

"Unless otherwise specified, f is not evaluated until a specific value
has been assigned to i, and is then evaluated for each value of i
chosen. You can use Evaluate[f] to make f be evaluated immediately,
rather than only after a specific value has been assigned to i."  (A.4.2
under Help for Plot)

Bobby Treat

-----Original Message-----
From: Vladimir Bondarenko [mailto:vvb at mail.strace.net] 
To: mathgroup at smc.vnet.net
Subject: [mg33946] [mg33925] Why these graphs differ?

These solutions, naturally, coincide.

         DSolve[{y'[z] == z, y[0] == 1}, y[z], z][[1, 1, 2]]
Evaluate[DSolve[{y'[z] == z, y[0] == 1}, y[z], z][[1, 1, 2]]]

(2 + z^2)/2
(2 + z^2)/2


But, surprisingly, the corresponding graphs are not identical:

Plot[         DSolve[{y'[z] == z, y[0] == 1}, y[z], z][[1, 1, 2]],  {z,
0, 1}]
Plot[Evaluate[DSolve[{y'[z] == z, y[0] == 1}, y[z], z][[1, 1, 2]]], {z,
0, 1}]


Is it a feature or a problem?


Vladimir Bondarenko







  • Prev by Date: RE: Re: MathGL3D problem.....
  • Next by Date: RE: Why these graphs differ?
  • Previous by thread: Re: Why these graphs differ?
  • Next by thread: RE: Why these graphs differ?