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

Re: LogLog plot of NDSolve solution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52591] Re: LogLog plot of NDSolve solution
  • From: Peter Pein <petsie at arcor.de>
  • Date: Fri, 3 Dec 2004 03:54:00 -0500 (EST)
  • References: <comfv4$5pe$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Adam Getchell wrote:
> Hello all,
> 
> I'm solving an ODE via NDSolve (neutron abundance for Big Bang 
> Nucleosynthesis -- from "Modern Cosmology", S. Dodelson). The result 
> comes out as an InterpolatingFunction, which plots fine using Plot. 
> However, if I wish to do a Log-Log plot, neither LogLogPlot nor 
> LogLogListPlot work. What am I missing?
> 
> \!\(Dodelson := \(\[CapitalChi]'\)[
>         x] - \(x\/H\) \(255\/\(\(\[Tau]\_n\) x\^5\)\) \((12 + 6  x +
>             x\^2)\) \((\[ExponentialE]\^\(-x\) - \[CapitalChi][
>                 x] \((1 + \[ExponentialE]\^\(-x\))\))\)\)
> 
> In[329]:=
> \!\(\(\(\[IndentingNewLine]\)\(ans =
>     NDSolve[{Dodelson \[Equal]
>             0 /. {H \[Rule] 1.13, \[Tau]\_n \[Rule] 886.7}, \[CapitalChi][
>             1.293] \[Equal]  .25}, \[CapitalChi], {x,  .1, 1.3},
>       MaxSteps \[Rule] 10\^6]\)\)\)
> 
> Using the Evaluate trick suggested by 
> http://www.nhn.ou.edu/~morrison/Mathematica/TipSheets/2Dgraphics.pdf 
> doesn't work.
> 
> This example doesn't cover LogLogPlots: 
> http://documents.wolfram.com/v4/MainBook/3.8.2.html
> 
> Other search results on Google haven't turned up anything so far.
> 
> Thanks,
> 
> --Adam Getchell
> 
> 
Hello Adam,

maybe you mixed up \[CapitalChi] and X?

This works with Version 4 and should do so with more up to date Versions:

Chi = \[CapitalChi] /. First[ans];
x0 = x /. First@FindRoot[Chi[x], {x, .5, 1}];
LogLogPlot[Chi[x], {x, x0, 1.3}]; (* works fine *)

Have a nice day,
   Peter

-- 
Peter Pein
10245 Berlin


  • Prev by Date: Re: Another Integrate error
  • Next by Date: Re: Compiled function with NIntegrate
  • Previous by thread: Re: LogLog plot of NDSolve solution
  • Next by thread: JLink to remote kernel not possible?