Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Plotting a series of Roots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128876] Re: Plotting a series of Roots
  • From: William Duhe <wjduhe at loyno.edu>
  • Date: Sat, 1 Dec 2012 04:37:30 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

I want to make the second bit of code operate like the first:

First



s1[lambda_, t_] = 
  x[t] /. DSolve[{x'[t] == lambda, x[0] == 0}, x[t], t][[1]];

lambda t;


t1[lambda_, value_] = t /. Solve[s1[lambda, t] == value, t][[1]];

value/lambda;


s1[lambda, t1[lambda, value]];

value;

Plot[t1[lambda, 1], {lambda, .1, 1}, PlotRange -> Automatic]





Second




M = 10000;
g = 1;
A = 10;
a = 1/100;(*initial plot temp*)b = 12/10;(*final plot temp*)c = 
 10^-8;(*initial temp*)d = 0;(*initial \[Beta]*)m = 1;

s[\[Alpha]_?NumericQ, t_?NumericQ] := 
  Module[{bb = (g/(2*\[Pi])^(3/2)*(m/T)^(3/2)*E^(-m/T))}, \[Beta][
     t] /. NDSolve[{\[Beta]'[
         T] == (3*\[Alpha]^2*M*T^(5/2))/(Sqrt[2*g]*
            m^(9/2))*(bb^2 - \[Beta][T]^2), \[Beta][c] == 
        d}, \[Beta], {T, a, b}, Method -> "BDF"][[1]]];
t1[\[Alpha]_?NumericQ, value_?NumericQ] = 
  t /. NSolve[s[\[Alpha], t] == value, t][[1]];
Plot[t1[\[Alpha], .9], {\[Alpha], .1, 1}, PlotRange -> Automatic]


But I can't seem to make it go!



  • Prev by Date: Mathematica 9.0.0.0 for windows crash
  • Next by Date: Re: V9 !!!
  • Previous by thread: Re: Mathematica 9.0.0.0 for windows crash
  • Next by thread: Re: Plotting a series of Roots