I have managed to compute the half width at half maximum (HWHM) and full width at half maximum (FWHM) of a sinc function through the code below.
ClearAll["Global`*"]
Plot[Sin[\[Pi]*x]/(\[Pi]*x), {x, -2, 2}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
Normal[Series[Sin[\[Pi]*x]/(\[Pi]*x), {x, 0, 12}]]
Plot[Evaluate[Normal[Series[Sin[\[Pi]*x]/(\[Pi]*x), {x, 0, 12}]]], {x,-2, 2}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
N[Solve[Normal[Series[Sin[\[Pi]*x]/(\[Pi]*x), {x, 0, 12}]] == 1/2, x]]
where the HWHM is equal to the absolute value of the lowest Real root, and the FWHM is two times this value.
I have tryed to apply the same procedure to compute the HWHM and FWHM of $ \int_{0}^{t} \cos\left( 2\pi f_{c}\tau \right) \cos\left[ 2\pi\left( kt + f_{0}\right)\tau \right]\; d\tau $, where $ f_{c} = 2\times 10^9 $, $ k=30\times 10^{15} $ and $ f_{0}=0.5\times 10^9 $, with the following code.
ClearAll["Global`*"]
Subscript[f, c] = 2*10^9;
k = 30*10^15;
Subscript[f, 0] = 0.5*10^9;
Subscript[s, out] = \!\(\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(t\)]\(Cos[2*\[Pi]*\*SubscriptBox[\(f\), \(c\)]*\[Tau]]*Cos[2*\[Pi]*\((k*t + \*SubscriptBox[\(f\), \(0\)])\)*\[Tau]] \[DifferentialD]\[Tau]\)\)
Plot[Subscript[s, out], {t, 49*10^-9, 51*10^-9}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
soutexpansion = Expand[Normal[Series[Subscript[s, out], {t, 50*10^-9, 2}]]]
Plot[Evaluate[soutexpansion], {t, 49.6*10^-9, 50.4*10^-9}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
Solve[soutexpansion == (2.5*10^-8)/2, t]
I know the maximum is at $ t=50\times 10^{-9} $, and that it attains a value of $ 2.5\times10^{-8} $. However, after the Taylor expansion around $ t=50\times 10^{-9} $, I cannot reconstruct the curve around this point. QUESTION 1: Ploting the expanded second order polynomial, as in the snippet, the parabola shows a positive concavity. Shouldn't it have a negative concavity?
I have applied a trigonometric identity to rearange the termes of the integrand and thus were able to reconstruct the expression around $ t=50\times 10^{-9} $ with the code below.
Subscript[s, out2] = \!\(\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(t\)]\(\*FractionBox[\(1\), \(2\)]*\((Cos[2*\[Pi]*\((k*t + \*SubscriptBox[\(f\), \(0\)] - \*SubscriptBox[\(f\), \(c\)])\)*\[Tau]] + Cos[2*\[Pi]*\((k*t + \*SubscriptBox[\(f\), \(0\)] + \*SubscriptBox[\(f\), \(c\)])\)*\[Tau]])\) \[DifferentialD]\[Tau]\)\)
Plot[Subscript[s, out2], {t, 49.6*10^-9, 50.4*10^-9}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
Subscript[s, out2series] = Normal[Series[Subscript[s, out2], {t, 50*10^-9, 30}]]
Plot[Evaluate[Subscript[s, out2series]], {t, 49.6*10^-9, 50.4*10^-9}, PlotRange -> Full, Exclusions -> None, GridLines -> Automatic, ImageSize -> Full]
Solve[Subscript[s, out2series] == (2.5*10^-8)/2, t]
However, this time, when I try to find the roots of the expression that would lead me to the value of the HWHM and FWHM, all roots returned have the same value, what does not make sense.
QUESTION 2: Am I missing something? Is it correct what I am doing?
QUESTION 3: Is there a better way to find the HWHM and FWHM of the above function?
Subscript
while defining variables.Subscript[x, 1]
is not a symbol, but a composite expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign a Downvalue to the opratorSubscript
and not an Ownvalue to an indexedx
as you may intend. Read how to properly define indexed variables here $\endgroup$