Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Relating Two Functions' topicStudent Support Forum > General > Archives > "Relating Two Functions"

Next Comment >Help | Reply To Topic
Author Comment/Response
William Duhe
07/26/12 09:37am

So here I have several functions plotted, a[t], B[t],Rm[t]. What I need is syntax that will allow me to see the value of a[t] when T[t] is 1. This should be easy to see that at first when T[t] is 1 a[t] is also one, but as the function turns around T[t] becomes 1 again, at about t = 575, and a[t] has risen by a certain amount. I need to quantify this amount. The syntax is provided bellow. Thanks ahead of time and best wishes!





M = 100;
g = 1;
\[Alpha] = 1;
ti = 0;(*initial time*)
tf = 700; (*final plot time*)
m = 1;
RB[t] = (m*T[t]^3*g)/(2*\[Pi])^(3/2)*(m/T[t])^(3/2)*E^(-m/T[t]);
R = 0.0005;
V = 5*10^(-12)*M^4;
i = Sqrt[(g*m^4 - V)/(3*M^2)]*m;
rR = g*T[t]^4;(*Energy Density-Radiation*)
pR = g*T[t]^4;(*Pressure-Radiation*)
pM = 0;(*Pressure-Phi Particle*)
r = rR + Rm[t] - V;(*Overall Energy Density*)
p = pR + V;(*Overall Pressure*)
s1 = NDSolve[{a''[t] == -a[t]*1/(6*M^2) (2*g*T[t]^4 + 2 V + Rm[t]),
T'[t] == (R*Rm[t])/
T[t]^3 - (Sqrt[3/2]*\[Alpha]^2)/(
Sqrt[T[t]]*m^(
11/2))*(((g*T[t]^3*m)/(2*\[Pi])^(3/2)*(m/T[t])^(3/2)*
E^(-m/T[t]))^2 - Rm[t]^2) - (a'[t]*T[t])/a[t],
Rm'[t] == -R*Rm[t] + (Sqrt[3/2]*\[Alpha]^2*T[t]^(5/2))/m^(
11/2)*((g/(2*\[Pi])^(3/2)*(m/T[t])^(3/2)*E^(-m/T[t]))^2 -
Rm[t]^2) - 3 a'[t]/a[t]*Rm[t], T[0] == m,
Rm[0] == g/(2*\[Pi])^(3/2)*E^-1, a'[0] == i, a[0] == 1}, {a[t],
T[t], Rm[t]}, {t, ti, tf}, Method -> "BDF"]

Plot[Evaluate[Rm[t]/RB[t] /. s1], {t, ti, tf}, PlotRange -> Automatic,
AxesLabel -> {Time, Rm[t]}]
Plot[Evaluate[T[t] /. s1], {t, ti, tf}, PlotRange -> Automatic,
AxesLabel -> {Time, T[t]}]
Plot[Evaluate[a[t] /. s1], {t, ti, tf}, PlotRange -> Automatic,
AxesLabel -> {Time, a[t]}]





URL: ,

Subject (listing for 'Relating Two Functions')
Author Date Posted
Relating Two Functions William Duhe 07/26/12 09:37am
Re: Relating Two Functions Bill Simpson 07/26/12 11:59pm
Next Comment >Help | Reply To Topic