Function composition examples

shinkansenSpeed=Quantity[320,(("Kilometers")/("Hours"))]

UnitConvert[shinkansenSpeed]

UnitConvert[shinkansenSpeed]//N

g=Quantity[1,"StandardAccelerationOfGravity"]

UnitConvert[g]

UnitConvert[g]//N

Solve[(1/2)g (t^2)==Quantity[2,"Meters"],t]

shinkansenSpeed*t/.Solve[(1/2)g (t^2)==Quantity[2,"Meters"],t]

UnitConvert[shinkansenSpeed]*t/.Solve[(1/2)g (t^2)==Quantity[2,"Meters"],t]//N

xmax=Max[QuantityMagnitude/@(
UnitConvert[shinkansenSpeed]*t/.Solve[(1/2)g (t^2)==Quantity[2,"Meters"],t]//N
)]

balldropy[
x_
]:=
-QuantityMagnitude[(1/2)UnitConvert[g((((x/shinkansenSpeed)))^2)]]

balldropy/@{0,57}//N

Block[{is=600},
Column[
{

Plot[balldropy[x],{x,0,xmax}
,AspectRatio->Automatic
,ImageSize->is
],
Plot[balldropy[x],{x,0,xmax}
,ImageSize->is
]
}
]
]

Biomass graph

labelstyle[
t_
]:=
Rotate[
Style[t,Bold,FontSize->14],
-(π/2)
]

speciesList1={"Hs","Bt", "Oa", "Efc", "Sd", "Cah"}

speciesList2={"human","cow", "sheep", "horse", "pig", "goat"}

bg1=Append[
Flatten@Block[{sspecies, n=4},
Table[
sspecies=ToString[species];
{labelstyle["t"]->labelstyle@sspecies,
labelstyle@sspecies->labelstyle@Subscript["(OverBar[m])",sspecies],
labelstyle@sspecies->labelstyle@Subscript["N",sspecies],
labelstyle@Subscript["(OverBar[m])",sspecies]->labelstyle@Subscript["×",sspecies],
labelstyle@Subscript["N",sspecies]->labelstyle@Subscript["×",sspecies],
labelstyle@Subscript["×",sspecies]->labelstyle@Subscript["M",sspecies],
labelstyle@Subscript["M",sspecies]->labelstyle@"+"
},
{species,Reverse@ speciesList2}
]
],
labelstyle@"+"->labelstyle["Biomass"]
]

vg1=Graph[bg1
,VertexLabels->{"Name",_->Placed["Name", After]}
,VertexSize->Medium
,LabelStyle->Directive[Bold,FontSize->24]
,ImageSize->400
,AspectRatio->1.5
,EdgeStyle->Thick
]

Rotate[vg1,(π/2)]

Composition example

f1[
x_
]:=
Sin[x]

g1[
x_
]:=
x^2

Plot[{
f1[g1[x]],
g1[f1[x]]
},{x,-2π,2π}
,PlotLegends->{"f∘g = sin((x^2))","g∘f = (sin(x))^2"}
]

ChebyshevT[2,x]

ChebyshevT[3,x]

ChebyshevT[4,x]

{
ChebyshevT[2,ChebyshevT[3,x]],
ChebyshevT[2,ChebyshevT[3,x]]//Expand,
ChebyshevT[6,x]
}

{
ChebyshevT[3,ChebyshevT[2,x]],
ChebyshevT[3,ChebyshevT[2,x]]//Expand
}

f2[
x_
]:=
Sqrt[x]

g2[
x_
]:=
(1/(x^2))

f2[g2[-2]]

g2[f2[-2]]

Logistic map

log[
n_
]:=
((r n (k-n))/k)

log[n]//Simplify

log[n]==(1-(n/k))((n/k))k r//Simplify

a x(1-x)/.{a->k r,x->(n/k)}

log[n]==a x(1-x)/.{a->k r,x->(n/k)}//Simplify