FourierDST[list]
finds the Fourier discrete sine transform of a list of real numbers.
FourierDST[list,m]
finds the Fourier discrete sine transform of type
.
FourierDST
FourierDST[list]
finds the Fourier discrete sine transform of a list of real numbers.
FourierDST[list,m]
finds the Fourier discrete sine transform of type
.
Details
- Possible types
of discrete sine transform for a list
of length
giving a result
are: -
1 (DST-I) 
2 (DST-II) 
3 (DST-III) 
4 (DST-IV) 
- FourierDST[list] is equivalent to FourierDST[list,2].
- The inverse discrete sine transforms for types 1, 2, 3, 4 are types 1, 3, 2, 4, respectively.
- The list given in FourierDST[list] can be nested to represent an array of data in any number of dimensions.
- The array of data must be rectangular.
- If the elements of list are exact numbers, FourierDST begins by applying N to them.
- FourierDST can be used on SparseArray objects.
Examples
open all close allBasic Examples (2)
Find a discrete sine transform:
FourierDST[{0, 0, 1, 0, 1}]Find the inverse discrete sine transform:
FourierDST[%, 3]Find a discrete sine transform of type 1 (DST-I):
FourierDST[{1, 0, 0, 1, 2}, 1]Find the inverse discrete sine transform:
FourierDST[%, 1]Scope (2)
Use machine arithmetic to compute the discrete sine transform:
v = {0, 1, 2, 3, 4, 3, 2, 1, 0};FourierDST[v]Use 24‐digit precision arithmetic:
FourierDST[N[v, 24]]Two-dimensional discrete sine transform:
m = RandomReal[1, {4, 3}];FourierDST[m]Four-dimensional discrete sine transform:
m = RandomReal[1, {4, 4, 4, 4}];Max[FourierDST[m]]Generalizations & Extensions (2)
Applications (2)
Sine Series Expansion (1)
Get an expansion for an odd function as a sum of sines:
f[x_] := Exp[-100(x - 1 / 2) ^ 2];The function values on a uniformly spaced grid with n points on [-L,L):
n = 20;
xg = N[Range[n - 1]] / n;
fg = Map[f, xg];
fp = ListPlot[Transpose[{xg, fg}], PlotRange -> All]Compute the DST-I and renormalize:
coef = FourierDST[fg, 1] / Sqrt[n / 2];The function has, in effect, been periodized with a particular odd symmetry:
Show[fp, Plot[Sum[coef[[r]] * Sin[Pi r x], {r, n - 1}], {x, -1, 1}, PlotRange -> All]]Plot the expansion error where the points are defined:
Plot[f[x] - Sum[coef[[r]] * Sin[Pi r x], {r, n - 1}], {x, 0, 1 - 1 / n}, PlotRange -> All]Pseudospectral PDE Discretization (1)
Approximate the second derivative for a function with zero boundary conditions:
uxx[u_ ? VectorQ] := Module[{n = Length[u]},
FourierDST[-(Pi N[Range[n] / (n + 1)]) ^ 2 FourierDST[u, 1], 1]]n = 20;
xg = N[Range[n]] / (n + 1);
u0 = 1 - 2 Abs[xg - .5];
ListPlot[{Transpose[{xg, u0}], Transpose[{xg, uxx[u0]}]}]Solve the wave equation for a plucked string:
sol = First[NDSolve[{u'[t] == v[t], v'[t] == uxx[u[t]], u[0] == u0, v[0] == ConstantArray[0., n]},
{u, v}, {t, 0, 25}]]Plot the solution
as a surface:
ListPlot3D[Table[u[t] /. sol, {t, 0, 25}], Mesh -> False, DataRange -> {{0, 25}, {0, 1}}]Properties & Relations (3)
DST-I and DST-IV are their own inverses:
data = RandomReal[1, 9];Chop[FourierDST[FourierDST[data, 1], 1] - data]Chop[FourierDST[FourierDST[data, 4], 4] - data]DST-II and DST-III are inverses of each other:
data = RandomReal[1, 15];Chop[FourierDST[FourierDST[data, 2], 3] - data]Chop[FourierDST[FourierDST[data, 3], 2] - data]The DST is equivalent to matrix multiplication:
dstII[n_] := (1/Sqrt[n])Table[Sin[Pi(r - 1 / 2)s / n], {s, n}, {r, n}]MatrixForm[dstII[7]]data = RandomReal[1, 7];Chop[dstII[7].data - FourierDST[data]]Possible Issues (1)
FourierDST always returns normalized results:
TableForm[Table[FourierDST[ConstantArray[1, 5], type], {type, 1, 4}]]To get unnormalized results, you can multiply by the normalization:
nc[n_, 1] = Sqrt[(n + 1) / 2];
nc[n_, 2 | 3] = Sqrt[n];
nc[n_, 4] = Sqrt[n / 2];unnormalizedDST[data_, type_] := FourierDST[data, type] * nc[Length[data], type]TableForm[Table[unnormalizedDST[ConstantArray[1, 5], type], {type, 1, 4}]]Tech Notes
Related Guides
History
Text
Wolfram Research (2007), FourierDST, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDST.html.
CMS
Wolfram Language. 2007. "FourierDST." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FourierDST.html.
APA
Wolfram Language. (2007). FourierDST. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FourierDST.html
BibTeX
@misc{reference.wolfram_2026_fourierdst, author="Wolfram Research", title="{FourierDST}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/FourierDST.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fourierdst, organization={Wolfram Research}, title={FourierDST}, year={2007}, url={https://reference.wolfram.com/language/ref/FourierDST.html}, note=[Accessed: 13-June-2026]}