# Differentiate spherical harmonics FastTransforms.jl

**URL:** <https://discourse.julialang.org/t/differentiate-spherical-harmonics-fasttransforms-jl/77038>\
**Category:** Numerics\
**Created:** [February 24, 2022, 8:07pm UTC](https://discourse.julialang.org/t/differentiate-spherical-harmonics-fasttransforms-jl/77038 "2022-02-24T20:07:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhiwei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhiwei/32/12385_2.png) [@zhiwei](https://discourse.julialang.org/u/zhiwei)\
**Post date:** [February 24, 2022, 8:07pm UTC](https://discourse.julialang.org/t/differentiate-spherical-harmonics-fasttransforms-jl/77038/1 "2022-02-24T20:07:29Z")

</div>

Hello,

I am trying to differentiate spherical harmonic expansion by first converting to bivariate Fourier series using the package FastTransforms.jl.

Here’s what I have so far:

```julia
julia> N=15;

julia> M=2*N-1;

julia> C=sphrandn(Float64, N, M);

julia> CF=sph2fourier(C); convert to Fourier series

```

Question: How do I differentiate with respect to theta (the polar angle) in the Fourier coefficient space? For normal fft, I can multiply the Fourier coeffs by fftfreq.
