Mathematica plot question, dsolve

In summary, the speaker is seeking help to plot a graph using Mathematica. They are struggling with solving an equation and have provided the necessary code and information for the task. They are specifically looking to plot b[a]/b[0.0001] vs. a in a log scale.
  • #1
kptsilva
33
0
Hey guys,

I'm using Mathematica to plot some graphs and I'm having a bit of a hard time.

First I have to solve the following equation,

2/3 a^2 b''[a] + (1 - w[a]) a b'[a] - (1 + w[a]) (1 - 3 c w[a]) b[a]

Boundary condition b'[0.0001]=0
Where;

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

(c=1) (c is a variable but let's consider a particular instance c=1)

a goes from 10^-4 to 1000 in a log scale.

I want to plot b[a]/b[0.0001] vs. a

I've so far written a simple code but it is with errors.

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]
F[a_] = DSolve[{fun == 0, b'[10^(-4)] == 0}, b, a]
L = LogLinearPlot[Evaluate[F[a]/F[0.0001]], {a, 10^-4, 10},
PlotRange -> All];

Please can anyone help me?
 
Physics news on Phys.org
  • #2
Hey guys,

I'm using Mathematica to plot some graphs and I'm having a bit of a hard time.

First I have to solve the following equation,

2/3 a^2 b''[a] + (1 - w[a]) a b'[a] - (1 + w[a]) (1 - 3 c w[a]) b[a]

Boundary condition b'[0.0001]=0
Where;

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

(c=1) (c is a variable but let's consider a particular instance c=1)

a goes from 10^-4 to 1000 in a log scale.

I want to plot b[a]/b[0.0001] vs. a

I've so far written a simple code but it is with errors.

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]
F[a_] = DSolve[{fun == 0, b'[10^(-4)] == 0}, b, a]
L = LogLinearPlot[Evaluate[F[a]/F[0.0001]], {a, 10^-4, 10},
PlotRange -> All];
 

Related to Mathematica plot question, dsolve

1. What is Mathematica plot question?

Mathematica plot question refers to a type of inquiry related to using the Mathematica software to create and manipulate plots and graphs. This can range from basic plotting functions to more advanced features such as labeling, styling, and adding annotations.

2. How do I plot a function in Mathematica?

To plot a function in Mathematica, use the command "Plot[function, {variable, xmin, xmax}]" where "function" is the expression you want to plot and "variable" is the independent variable. You can also add options such as setting the plot range or adding a title using the "Plot" command.

3. What is dsolve in Mathematica?

Dsolve is a built-in function in Mathematica that is used to solve differential equations. It can be used for both ordinary and partial differential equations, and can handle linear and nonlinear equations. The output of dsolve is usually given in the form of a list of solutions.

4. How do I use dsolve to solve a differential equation?

To use dsolve, first define the differential equation using the syntax "eqn = differential equation". Then, use the command "dsolve[eqn, y, x]" where "y" is the dependent variable and "x" is the independent variable. This will return a list of solutions for the given differential equation.

5. Can Mathematica plot 3D graphs?

Yes, Mathematica has the capability to plot 3D graphs using the "Plot3D" command. This command takes in a function of two variables, and can also accept options for styling and labeling. Additionally, Mathematica has other functions such as "ParametricPlot3D" and "ContourPlot3D" for more specialized 3D plotting.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
928
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
Back
Top