{ "cells": [ { "cell_type": "markdown", "id": "38fbfaab", "metadata": {}, "source": [ "---\n", "format:\n", " html:\n", " other-links:\n", " - text: This notebook\n", " href: A7.ipynb\n", "---\n", "\n", "# A7: Legendre Polynomials\n", "\n", "- Complete the following and submit to Canvas before Nov 14 11:59PM,\n", "- Late work will recieve 0%,\n", "- Each assignment is worth the same, \n", "- Please get in contact with the instructor in plenty of time if you need help,\n", "- Before submitting your work, make sure to check everything runs as expected. Click **Kernel > Restart Kernel and Run All Cells**.\n", "- Feel free to add more cells to experiment or test your answers,\n", "- I encourage you to discuss the course material and assignment questions with your classmates. However, unless otherwise explicitly stated on the assignment, you must complete and write up your solutions on your own,\n", "- The use of GenAI is prohibited as outlined in the course syllabus. If I suspect you of cheating, you may be asked to complete a written or oral exam on the content of this assignment. " ] }, { "cell_type": "code", "execution_count": 2, "id": "abcd4e70", "metadata": {}, "outputs": [], "source": [ "# | code-fold: true\n", "using Plots\n", "using LaTeXStrings\n", "using Polynomials\n", "using LinearAlgebra" ] }, { "cell_type": "markdown", "id": "4909df0c", "metadata": {}, "source": [ "::: {.callout-note}\n", "\n", "Recall that $P_n$ is the monic (leading coefficient $= 1$) polynomials of degree $n$ for which \n", "\n", "\\begin{align}\n", " \\int_{-1}^{+1} P_n(x) q(x) \\mathrm{d}x = 0 \n", "\\end{align}\n", "\n", "for all polynomials $q$ of degree less than or equal to $n-1$ (that is, $q \\in \\mathcal P_{n-1}$). We are interested in computing (the roots of) $P_n$ in order to define Gauss quadrature rules.\n", "\n", ":::\n", "\n", "1. Show that $P_n$ can be equivalently defined as the monic polynomial of degree $n$ for which \n", "\n", "\\begin{align}\n", " \\int_{-1}^1 P_n(x) P_m(x) \\mathrm{d}x = 0\n", " %\n", " \\qquad \\text{for all } n \\not= m. \n", "\\end{align}\n", "\n", "