Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ii/paper-1/8b/a/solution

For a type-two generating function, compare
with
The coefficients give the canonical-transformation equations

New to topics? Read the docs here!