Mathematica problem regarding plotting many functions in one graph

AI Thread Summary
The discussion revolves around a Mathematica user seeking assistance with plotting multiple functions on a single graph using a logarithmic scale for the x-axis. The user has defined a function w[a] dependent on a and c, and they want to plot b[a] for various values of c, specifically c=1/3, 1/2, and 2/3. They have provided a code snippet that includes the differential equation and the initial conditions for solving b[a]. The user is looking for guidance on how to incorporate these different c values into the same plot. The conversation emphasizes the need for clarity on plotting multiple functions in Mathematica effectively.
kptsilva
Messages
33
Reaction score
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]
 
Physics news on Phys.org
any help would be much appreciated
 
Back
Top