- #1
kptsilva
- 33
- 0
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]
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]