1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica problem regarding plotting many functions in one graph

  1. May 9, 2012 #1
    hey guys i have a problem regarding plotting several graphs in one plot via mathematica. I want this plot's x axis to be in a log scale so i used loglinear command.

    here the plot is b[a] vs. a.
    w[a] is part of my differential equation and it depends upon a and c.
    i have written the program the program for c=1 below. I want to plot for several other c values(like c=1/3,1/2 and 2/3) in the same plot. is it possible via mathematica?

    c = 1;
    w[a_] := 2*a^(3*(1 + c))/(1 + 2*a^(3*(1 + c)));

    fun = 2/3 a^2 b''[a] + (1 - w[a]) a b'[
    a] - (1 + w[a]) (1 - 3 c w[a]) b[a]
    test = NDSolve[{fun == 0, b'[10^(-4)] == 0, b[10^(-4)] == 1},
    b, {a, 10^-4, 10}]
    LogLinearPlot[Evaluate[b[a] /. test], {a, 10^-4, 10},
    PlotRange -> All]
     
  2. jcsd
  3. May 10, 2012 #2
    any help would be much appreciated
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Mathematica problem regarding plotting many functions in one graph
  1. Mathematica plot (Replies: 0)

Loading...