Mathematica problem regarding plotting many functions in one graph

Click For Summary
SUMMARY

The discussion focuses on plotting multiple functions in a single graph using Mathematica, specifically employing the LogLinearPlot function. The user aims to visualize the relationship between b[a] and a for different values of the parameter c (1/3, 1/2, and 2/3) while maintaining a logarithmic scale on the x-axis. The provided code snippet includes a differential equation defined by w[a] and utilizes NDSolve to compute the necessary values for plotting. The user seeks assistance in modifying the code to include multiple c values in the same plot.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of differential equations and their numerical solutions
  • Knowledge of the LogLinearPlot function in Mathematica
  • Basic concepts of parameter variation in mathematical modeling
NEXT STEPS
  • Explore the use of Table or Map functions in Mathematica for plotting multiple functions
  • Learn about the Manipulate function in Mathematica for interactive parameter adjustments
  • Investigate advanced plotting options in Mathematica for customizing graph aesthetics
  • Study the implications of logarithmic scaling on data interpretation in plots
USEFUL FOR

Mathematica users, mathematicians, and scientists involved in numerical analysis and graphical representation of mathematical functions.

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
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K