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 plot question, dsolve

  1. Jun 2, 2012 #1
    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?
     
  2. jcsd
  3. Jun 3, 2012 #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];
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Mathematica plot question, dsolve
  1. Mathematica plot (Replies: 0)

Loading...