{NotebookFileName[],DateString[]}

style[
t_
]:=
Style[t,Bold,FontFamily->"Arial",FontSize->14]

$Assumptions={{x,y}∈Reals}

Mobius lesson

(∫_0^4)1.5t\[DifferentialD]t+(∫_4^10)(6+((t-4)/3))\[DifferentialD]t

Some integrals

(∫_0^4000)100*(2^(-t/1000))\[DifferentialD]t

(∫_0^2)(Sqrt[4-(x^2)])\[DifferentialD]x

(∫_0^1)(Sqrt[4-(x^2)])\[DifferentialD]x

logfac1=Assuming[
{n>1},
(∫_1^n)Log[x+(1/2)]\[DifferentialD]x//Simplify
]

logfac2=(n+(1/2))Log[n+(1/2)]-n+1-(3/2)Log[(3/2)]

logfac2-logfac1//FullSimplify

{
(∫_0^∞)(E^(-x))\[DifferentialD]x,
(∫_0^1)Log[x]\[DifferentialD]x
}

Gravity due to a sphere

Suppose you have a ring (a circle with no thickness) of radius r and mass m. What gravitational force does it exert on an object on its axis at a distance ρ from its center? The force will obviously be along the axis and towards the center of the ring, so i only need compute the axial component of the force. The force due to an angle element dθ will be F=-M((mdθ)/(2π))(G/((r^2)+(ρ^2))), but this is towards the element. Its axial and perpendicular components are ((F ρ)/((r^2)+(ρ^2))) and ((F r)/((r^2)+(ρ^2))). I only need the first. The force of the whole ring is that multiplied by ((2π)/(dθ)), or -G M m((ρ/(Sqrt[(r^2)+(ρ^2)])))((1/((r^2)+(ρ^2)))).

Now, suppose this ring belongs to a spherical shell. The radius of the shell is R, and its center is at distance x from the object. Then, for φ from 0 to π, there is a ring of radius R sin φ and mass m∝sin φ and ρ=x-R cos φ.

$Assumptions=Union[$Assumptions,{r>0,R>0,ρ>0,x>0,x>R,s>R,s>ρ}]

Block[{ρ=x-R Cos[φ],r=R Sin[φ]},
{
(r^2)+(ρ^2),
(1/((r^2)+(ρ^2))),
(ρ/((r^2)+(ρ^2))),
(ρ/((((r^2)+(ρ^2)))^2)),
((ρ Sin[φ])/((((r^2)+(ρ^2)))^(3/2)))
}//FullSimplify
]

Block[{ρ=x-R Cos[φ],r=R Sin[φ]},
{
((ρ Sin[φ])/((((r^2)+(ρ^2)))^(3/2)))//Simplify,
∫((ρ Sin[φ])/((((r^2)+(ρ^2)))^(3/2)))\[DifferentialD]φ//Simplify,
(∫_0^π)((ρ Sin[φ])/((((r^2)+(ρ^2)))^(3/2)))\[DifferentialD]φ//Simplify
}
]

Hurray! It works—gives me an inverse square force. But this looks like way too complex a thing to use in MATH 127.

OK, I see. It’s not actually so bad. First, I can substitute y(φ)= cos φ. I have a convenient sin φ to absorb the derivative, so I get

((x-r y[φ])/((((x^2)+(R^2)-2R x y[φ]))^(3/2)))D[y[φ],φ]/.y->Cos

That is the negative of my integrand. If φ goes from 0 to π, cos φ goes from 1 to -1. So I end up with

(∫_0^π)(((x-R cos φ)sin φ)/((((R^2)+(x^2)-2R x cos φ))^(3/2)))dφ=-(∫_1^(-1))((x-R y)/(((R^2)+(x^2)-2R x y)))dy

(∫_0^π)(((x-R Cos[φ])Sin[φ])/((((R^2)+(x^2)-2R x Cos[φ]))^(3/2)))\[DifferentialD]φ==-(∫_1^(-1))((x-R y)/( ((((R^2)+(x^2)-2R x y))^(3/2))))\[DifferentialD]y

{
∫((x-R y)/((((R^2)+(x^2)-2R x y))^(3/2)))\[DifferentialD]y,
∫(x/((((R^2)+(x^2)-2R x y))^(3/2)))\[DifferentialD]y,
∫((-R y)/((((R^2)+(x^2)-2R x y))^(3/2)))\[DifferentialD]y
}

Why does that work? OK, the x in the numerator is easy because when I differentiate (R^2)+(x^2)-2R x y with respect to y I get 2R x, which pops out the x in the numerator. What’s going on with the -R y? Looks like it may be a parts integration, with dv=((((R^2)+(x^2)-2R x y))^(-3/2))dy, u=-R y.

v1=∫((((R^2)+(x^2)-2R x y))^(-3/2))\[DifferentialD]y

u1=-R y

v1 D[u1,y]

v1 u1-∫v1 D[u1,y]\[DifferentialD]y

v1 u1-∫v1 D[u1,y]\[DifferentialD]y//Simplify

Yup, that does it.

OK, maybe I can use this as my crowning example.

Signum

(∫_a^b)Sign[x]\[DifferentialD]x

(∫_(-2)^(-1))Sign[x]\[DifferentialD]x

Hmm... Mathematica seems to get this wrong.

Block[{a=1,b=2,xmin=-2,xmax=3},
Show[
Plot[Sign[x],{x,-a,b}
,PlotStyle->Red
,Filling->Axis
,Epilog->{
Black,
Text[style["-a"],{-a,0},{0,-1}],
Text[style["b"],{b,0},{0,-1}]
}
],
Plot[Sign[x],{x,xmin,xmax}
,PlotStyle->Red
,PlotLegends->style/@{"sgn(x)"}
]
,PlotRange->{{xmin,xmax},All}
]
]

Block[{a=1,b=2},
Plot[Sign[x],{x,-a,b}
,PlotStyle->Red
,Filling->Axis
,Epilog->{
Black,
Text[style["-a"],{-a,0},{0,-1}],
Text[style["b"],{b,0},{0,-1}]
}
]
]

Improper integrals

Block[{a=0,b=3,f=x|->Exp[-x],xmin=-0.5,xmax=3},
Show[
Plot[f[x],{x,a,b}
,PlotStyle->Red
,Filling->Axis
,PlotLegends->style/@{"(E^(-x))"}
],
Plot[f[x],{x,xmin,xmax}
,PlotStyle->Red
]
,PlotRange->{{xmin,xmax},All}
,AspectRatio->1
]
]

Block[{a=0,b=1,f=x|->-Log[x],xmin=-0.5,xmax=(E^0.5)},
Show[
Plot[f[x],{x,a,b}
,PlotStyle->Red
,Filling->Axis
,PlotLegends->style/@{"-ln(x)"}
],
Plot[f[x],{x,xmin,xmax}
,PlotStyle->Red
]
,PlotRange->{{xmin,xmax},{-0.5,3}}
,AspectRatio->1
]
]

PDF[NormalDistribution[]]

Block[{a=-3,b=3,f=PDF[NormalDistribution[]],xmin=-3,xmax=3},
Show[
Plot[f[x],{x,a,b}
,PlotStyle->Red
,Filling->Axis
,PlotLegends->style/@{"(1/(Sqrt[2  π]))(E^(-(x^2)))"}
],
Plot[f[x],{x,xmin,xmax}
,PlotStyle->Red
]
,PlotRange->{{xmin,xmax},All}
]
]

{
(∫_1^∞)(1/x)\[DifferentialD]x,
(∫_0^1)(1/x)\[DifferentialD]x
}