diff --git "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.3-9.4 Norme, in\303\251galit\303\251 de Cauchy-Schwarz, orthogonalit\303\251, inegalit\303\251 du triangle, Pythagore.ipynb" "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.3-9.4 Norme, in\303\251galit\303\251 de Cauchy-Schwarz, orthogonalit\303\251, inegalit\303\251 du triangle, Pythagore.ipynb"
index 89f35f9..f6247f2 100644
--- "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.3-9.4 Norme, in\303\251galit\303\251 de Cauchy-Schwarz, orthogonalit\303\251, inegalit\303\251 du triangle, Pythagore.ipynb"
+++ "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.3-9.4 Norme, in\303\251galit\303\251 de Cauchy-Schwarz, orthogonalit\303\251, inegalit\303\251 du triangle, Pythagore.ipynb"
@@ -1,326 +1,326 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# **Concept(s)-clé(s) et théorie**\n",
"\n",
"## Définition 1 - Norme et Distance\n",
"Soit $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot, \\cdot \\rangle$. On définit la **norme** de $v \\in V$, notée par $||v||$, par \n",
"\n",
"\\begin{equation}\n",
"||v|| = \\sqrt{\\langle v, v\\rangle}\n",
"\\end{equation}\n",
"\n",
"Aussi, on définit la **distance** enre deux vecteurs $u,v \\in V$ comme étant $||u-v||$.\n",
"\n",
"## Propriétés 1 - Propriétés de la norme\n",
"Soient $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle\\cdot,\\cdot\\rangle$ et $v \\in V$. Alors les affimations suivantes sont vérifiées.\n",
"1. $||v|| \\geq 0$\n",
"2. Si $||v|| = 0$, alors $v=0$\n",
"3. $||\\alpha v|| = |\\alpha|||v|| \\ \\forall \\alpha \\in \\mathbb{R}$\n",
"\n",
"## Théorème 1 - Inégalitè de Cauchy-Schwarz\n",
"Soit $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot, \\cdot \\rangle$. Alors\n",
"\n",
"\\begin{equation}\n",
"|\\langle u,v \\rangle| \\leq ||u|| \\ ||v||\n",
"\\end{equation}\n",
"\n",
"ceci pour tout $u,v \\in V$.\n",
"\n",
"## Dèfiniton 2 - Angle entre deux vecteurs\n",
"Soient $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle\\cdot,\\cdot\\rangle$ et $u,v \\in V$ deux vecteurs non-nuls. Alors l'**angle** entre $u$ et $v$ est défini comme étant l'angle $0\\leq\\theta\\leq\\pi$ tel que\n",
"\n",
"\\begin{equation}\n",
"\\cos\\theta = \\dfrac{\\langle u,v \\rangle}{||u|| \\ ||v||}\n",
"\\end{equation}\n",
"\n",
"## Théorème 2 - Inègalitè du Triangle\n",
"Soit $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot,\\cdot \\rangle$. Alors, pour tous $u,v \\in V$, on a\n",
"\n",
"\\begin{equation}\n",
"||u+v|| \\leq ||u|| + ||v||\n",
"\\end{equation}\n",
"\n",
"## Théorème 3 - Pythagore Géneralisé\n",
"Soit $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot,\\cdot \\rangle$ et supposons que $u_1, \\dots, u_t \\in V$ soient des vecteurs deux-à-deux orthogonaux (i.e. $\\langle u_i,u_j \\rangle = 0 \\quad \\forall i,j \\in \\{1,\\dots,t\\}$ telles que $i \\neq j$). Alors\n",
"\n",
"\\begin{equation}\n",
"||u_1 + \\dots + u_t||^2 = ||u_1||^2 + \\dots + ||u_t||^2\n",
"\\end{equation}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exercises et Exemples"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import Librairie.AL_Fct as al\n",
"import Corrections.corrections as corrections\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 - Visualisation de l'inégalité Cauchy-Schwarz\n",
"\n",
"La preuve de l'inégalité Cauchy-Schwarz repose sur l'hypothèse que $$||u - \\lambda v||^2 \\geq 0 \\quad \\forall \\ \\lambda \\in \\mathbb{R}$$ En effet, en écrivant cette norme dans sa forme étendue, nous obtenons qu'elle équivaut à $$||u - \\lambda v||^2 = \\langle u - \\lambda v, u - \\lambda v \\rangle = ||u||^2 - 2\\lambda\\langle u,v \\rangle + \\lambda^2||v||^2$$ Il s'agit alors d'un polynôme de second ordre dans la variable réelle $\\lambda$ Ainsi, imposer la contrainte de non-négativité équivaut à dire que le discriminant $\\Delta = b^2 - 4ac$ est non positif. Cela implique que $$4\\big(\\langle u,v \\rangle\\big)^2 - 4||u|||^2||v||^2 \\leq 0$$ de sorte que, en divisant par $4$ et en prenant la racine carrée, on obtient l'inégalité Cauchy-Schwarz, i.e. $$|\\langle u,v \\rangle| \\leq ||u|| \\ ||v||$$\n",
"\n",
"Dans cet exemple, nous vous laissons choisir deux vecteurs $u$ et $v$ de n'importe quelle dimension ; il peut également s'agir de matrices (auquel cas le produit scalaire induit par la trace est adopté) ou de fonctions continues sur un intervalle d'intégration donné (auquel cas le produit scalaire intégral est utilisé). La parabole codant l'inégalité de Cauchy-Schwarz est alors tracée et vous pourrez observer que l'inégalité susmentionnée est respectée.\n",
"\n",
"**Question 1** : Quelle hypothèse faut-il assouplir pour obtenir une parabole présentant deux intersections distinctes avec l'axe des $x$ ?\n",
"\n",
"**Question 2** : Dans quels cas le sommet de la parabole est-il tangent à l'axe des $x$ ? Dans quels cas ne l'est-il pas ?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 1: vecteurs 2D\n",
"u = [1,2]\n",
"v = [-1,-2]\n",
"out = al.visualize_Cauchy_Schwarz(u,v)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 2: vecteurs 3D\n",
"u = [1,2,3]\n",
"v=[0,1,0]\n",
"out = al.visualize_Cauchy_Schwarz(u,v)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 3: matrices 2x2\n",
"u = [[1,1], [-1,-1]]\n",
"v = [[0,1], [1,0]]\n",
"out = al.visualize_Cauchy_Schwarz(u,v)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 4: matrices 3x3\n",
"u = [[1,2,3], [0,2,3], [0,0,3]]\n",
"v = [[1,1,1], [1,1,0], [0,0,1]]\n",
"out = al.visualize_Cauchy_Schwarz(u,v)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 5: fonctions avec 1 argument\n",
"u = lambda x: x\n",
"v = lambda x: np.exp(-x**2)\n",
"limits = [-1,1]\n",
"out = al.visualize_Cauchy_Schwarz(u,v, limits=limits)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas 6: fonctions avec 2 argument\n",
"u = lambda x,y: x + y\n",
"v = lambda x,y: np.sin(x) * np.sign(y)\n",
"limits = [[0,1], [-1,1]]\n",
"out = al.visualize_Cauchy_Schwarz(u,v, limits=limits)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercise 1\n",
"\n",
"Considérez les déclarations suivantes et marquez celles qui sont vraies.\n",
"\n",
"1. Soit $V=\\mathbb{R}^n$, muni du produit scalaire standard. Alors $$\\dfrac{\\left(\\sum_{i=1}^n u_i\\right)^2}{\\sum_{i=1}^n v_i} \\leq \\sum_{i=1}^n \\dfrac{u_i^2}{v_i} \\qquad \\forall \\ u,v \\in V$$\n",
"2. L'inégalité triangulaire et l'inégalité Cauchy-Schwarz portent toutes deux un signe d'égalité soit si au moins un des deux vecteurs est nul, soit si les deux vecteurs sont orthogonaux.\n",
"3. Soit $V$ un $\\mathbb{R}$-espace vectoriel, equipped with the inner product $\\langle \\cdot,\\cdot \\rangle$. The angle between the vectors $u$ and $\\tilde{v} =: v - \\dfrac{\\langle u,v \\rangle}{\\langle u,u \\rangle} u$, whichever $u,v \\in V$ non-null, is equal to $0$.\n",
"4. Let $V=\\mathcal{C}([-\\pi;\\pi]; \\mathbb{R})$, muni du produit scalaire standard $\\langle f,g \\rangle = \\int_{-\\pi}^{\\pi} f(t) \\ g(t) \\ dt$. Alors le théorème de Pythagore généralisé s'applique à la famille des vecteurs $\\mathcal{F}_1 = \\big\\{\\cos(kx)\\big\\}_{k=0}^{N_c} \\cup \\big\\{\\sin(kx)\\big\\}_{k=1}^{N_s}$, quelles que soient les valeurs de $N_c$ et $N_s$.\n",
"5. Soit $V = \\mathcal{C}([-1;1]; \\mathbb{R})$ muni du produit scalaire standard $\\langle f,g \\rangle = \\int_{-1}^{1} f(t) \\ g(t) \\ dt$. Alors le théorème de Pythagore généralisé s'applique à la famille des vecteurs $\\mathcal{F}_2 = \\big\\{x^{2n}\\big\\}_{n=0}^{N_e} \\cup \\big\\{x^{2m+1}\\big\\}_{m=0}^{N_o}$, quelles que soient les valeurs de $N_e$ et $N_o$.\n",
"6. Soit $V = \\mathcal{M}_{4\\times4}(\\mathbb{R})$ muni du produit scalaire standard $\\langle A,B \\rangle = Tr(A^TB)$. Alors le théorème de Pythagore généralisé s'applique à la famille des vecteurs $\\mathcal{F}_3 = \\Bigg\\{\\begin{pmatrix} 1/2 & -1/2 \\\\ 0 & 0 \\end{pmatrix}, \\begin{pmatrix} 1 & 1 \\\\ 0 & 0 \\end{pmatrix}, \\begin{pmatrix} 0 & 0 \\\\ -2 & -2 \\end{pmatrix}, \\begin{pmatrix} 0 & 0 \\\\ 1/4 & -1/4 \\end{pmatrix}\\Bigg\\}$."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"corrections.Ex1Chapitre9_3_4()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercise 2\n",
"Étant donné les couples de matrices suivants, déterminez l'angle entre les deux et les termes de gauche et de droite de l'égalité dans le thoerem de Pythagore, par rapport au produit scalaire défini via l'opérateur de trace\n",
"\n",
"1. $ \\qquad A = \\begin{pmatrix} -1 & 2 & 1 \\\\ 0 & 1 & -1 \\\\ -2 & 3 & 0 \\end{pmatrix} \\qquad \\quad \\ \\ \n",
" B = \\begin{pmatrix} 0 & -1 & 2 \\\\ 1 & 3 & -2 \\\\ 1 & 1 & 1 \\end{pmatrix}$ \n",
"2. $ \\qquad A = \\begin{pmatrix} 1 & -1 \\\\ 0 & 3 \\end{pmatrix} \\qquad \\qquad \\quad\n",
" B = \\begin{pmatrix} 0 & 2 \\\\ 1 & -1\\end{pmatrix}$\n",
"3. $ \\qquad A = \\begin{pmatrix} 0 & 1 & 3 & 0 \\\\ 1 & 0 & 1 & 0 \\\\ -1 & -2 & 2 & 1 \\\\ 3 & 4 & 1 & 2 \\end{pmatrix} \\qquad\n",
" B = \\begin{pmatrix} 3 & 1 & -1 & 2 \\\\ 2 & 2 & 0 & 1 \\\\ -1 & 1 & -1 & 3 \\\\ -1 & 1 & 1 & -1 \\end{pmatrix}$\n",
"4. $ \\qquad A = \\begin{pmatrix} 1 & 0 \\\\ -1 & 3 \\end{pmatrix} \\qquad \\qquad \\quad\n",
" B = \\begin{pmatrix} -1 & -5 \\\\ 2 & -3 \\end{pmatrix}$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 1\n",
"corrections.Ex2Chapitre9_3_4(case_nb=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 2\n",
"corrections.Ex2Chapitre9_3_4(case_nb=2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 3\n",
"corrections.Ex2Chapitre9_3_4(case_nb=3)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 4\n",
"corrections.Ex2Chapitre9_3_4(case_nb=4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercise 3\n",
"Étant donné les couples de fonctions suivants, déterminez l'angle entre les deux et les termes de gauche et de droite de l'égalité dans le thoerem de Pythagore, par rapport au produit scalaire donné\n",
"\n",
"1. $\\qquad f(x) = x; \\quad g(x) = e^{-|x|} \\qquad \\qquad \\qquad \\qquad \\qquad \\ \\ with: \\quad \\langle f, g \\rangle = \\int_{-1}^{1} f(x)g(x) \\ dx$\n",
"2. $\\qquad f(x) = x^3 + \\dfrac{1}{2}; \\quad g(x) = x^2 - x \\qquad \\qquad \\qquad \\quad \\ \\ with: \\quad \\langle f, g \\rangle = \\int_0^1 f(x)g(x) \\ dx$\n",
"3. $\\qquad f(x) = \\sin(|2x|); \\quad \\ g(x) = \\cos\\big(\\big|x + \\frac{\\pi}{2}\\big|\\big) \\qquad \\qquad \\ \\ with: \\quad \\langle f,g \\rangle = \\int_{-\\pi/2}^{\\pi/2} f(x)g(x) \\ dx$\n",
"4. $\\qquad f(x) = \\sin(|2x|); \\quad \\ g(x) = \\cos\\big(\\big|x + \\frac{\\pi}{2}\\big|\\big) \\qquad \\qquad \\ \\ with: \\quad \\langle f,g \\rangle = \\int_{0}^{\\pi/2} f(x)g(x) \\ dx$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 1\n",
"corrections.Ex3Chapitre9_3_4(case_nb=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 2\n",
"corrections.Ex3Chapitre9_3_4(case_nb=2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 3\n",
"corrections.Ex3Chapitre9_3_4(case_nb=3)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Cas Nombre 4\n",
"corrections.Ex3Chapitre9_3_4(case_nb=4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "[Passez au notebook du chapitre 9.5: bases](./9.3-9.4%20Norme%2C%20inégalité%20de%20Cauchy-Schwarz%2C%20orthogonalité%2C%20inegalité%20du%20triangle%2C%20Pythagore.ipynb)"
+ "[Passez au notebook du chapitre 9.5: ](./9.3-9.4%20Norme%2C%20inégalité%20de%20Cauchy-Schwarz%2C%20orthogonalité%2C%20inegalité%20du%20triangle%2C%20Pythagore.ipynb)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
diff --git "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.5 Bases othogonales, orthonormales-orthonorm\303\251e.ipynb" "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.5 Bases othogonales, orthonormales-orthonorm\303\251e.ipynb"
index 41810a6..e691f07 100644
--- "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.5 Bases othogonales, orthonormales-orthonorm\303\251e.ipynb"
+++ "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.5 Bases othogonales, orthonormales-orthonorm\303\251e.ipynb"
@@ -1,418 +1,418 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# **Concept(s)-clé(s) et théorie**\n",
"\n",
"## Définition 1 - Famille/Base Orthogonale/Orthonormal\n",
"Soient $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot,\\cdot \\rangle$ et $S \\subset V$ un sous-ensemble de $V$. On dit que $S$ est une **famille orthogonale** si $\\langle u,v \\rangle = 0 \\quad \\forall \\ u,v \\in S$ et que $S$ est une **famille orthonormale** (ou **orthonormée**) si de plus $\\langle u,u, \\rangle = 1$ pour tout $u \\in S$. Enfin, si $S$ est une base de $V$, alors on parle de **base orthogonale** our de **base othonormale** (ou **orthonormèe**).\n",
"\n",
"## Proposition 1 - Représentation d'un vecteur par rapport à une base orthogonale\n",
"Soient $V$ un $\\mathbb{R}$-espace vectoriel muni d'un produit scalaire $\\langle \\cdot,\\cdot \\rangle$ et $\\mathcal{B} = (v_1, \\dots, v_n)$ une base orthogonale de $V$. Alors pour tout $v \\in V$ on a\n",
"\n",
"$$\n",
"([v]_{\\mathcal{B}})_i = \\dfrac{\\langle v,v_i \\rangle}{||v_i||^2}\n",
"$$\n",
"\n",
"ceci pour tout $1 \\leq i \\leq n$. En particulier, si $\\mathcal{B}$ est orthonormale, alors on a\n",
"\n",
"$$\n",
"([v]_{\\mathcal{B}})_i = \\langle v,v_i \\rangle\n",
"$$\n",
"\n",
"ceci pour tout $1 \\leq i \\leq n$.\n",
"\n",
"## Proposition 2 - Produit scalaire et bases orthonormales\n",
"Soient $V$ un $\\mathbb{R}$-espace euclidien de dimension $n$ muni d'un produit scalaire $\\langle \\cdot,\\cdot \\rangle_V$ et $\\mathcal{B}$ une base ordonée de $V$. Aussi, designons par $\\cdot : \\mathbb{R}^n \\times \\mathbb{R}^n \\to \\mathbb{R}$ le produit scalaire usuel sur $\\mathbb{R}^n$. Alors\n",
"\n",
"$$\n",
"\\langle x,y \\rangle_V = [x]_{\\mathcal{B}} \\cdot [y]_{\\mathcal{B}} \\quad \\forall \\ x,y \\in V \\qquad \\Longleftrightarrow \\qquad\\mathcal{B} \\ \\ est \\ une \\ base \\ orthonormale\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exercises et Exemples"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import Librairie.AL_Fct as al\n",
"import Corrections.corrections as corrections\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercice 1\n",
"\n",
"Considérez les familles de vecteurs suivantes dans $\\mathbb{R}^n$ ($n \\in \\{2, \\dots, 5 \\}$) et déterminez si elles sont des familles/bases ortogonales/orthonormées, par rapport au produit scalaire donnée.\n",
"\n",
"1. $\\quad$ $V = \\mathbb{R}^2$; $\\qquad$ $\\langle u,v \\rangle_V = u^Tv$; $\\qquad \\qquad \\qquad \\qquad \\qquad \\qquad \\quad \\ $ $\\mathcal{F} = \\left\\{\\begin{pmatrix} 0\\\\1 \\end{pmatrix}, \\begin{pmatrix} \\frac{\\sqrt{2}}{2} \\\\ \\frac{\\sqrt{2}}{2} \\end{pmatrix}, \\begin{pmatrix} -\\frac{\\sqrt{2}}{2} \\\\ \\frac{\\sqrt{2}}{2} \\end{pmatrix}\\right\\}$\n",
"\n",
"2. $\\quad$ $V = \\mathbb{R}^3$; $\\qquad$ $\\langle u,v \\rangle_V = u^TAv \\quad avec \\ \\ A=\\begin{bmatrix} 2 & 0 & -1\\\\ 0 & 1 & 0\\\\ -1 & 0 & 1 \\end{bmatrix}$ $\\qquad$ $\\mathcal{F} = \\left\\{\\begin{pmatrix} 0\\\\1\\\\0 \\end{pmatrix}, \\begin{pmatrix} \\frac{\\sqrt{5}}{5} \\\\ 0 \\\\ -\\frac{\\sqrt{5}}{5} \\end{pmatrix}, \\begin{pmatrix} -\\frac{6}{5} \\\\ 0 \\\\ \\frac{9}{5} \\end{pmatrix}\\right\\}$\n",
"\n",
"3. $\\quad$ $V = \\mathbb{R}^4$; $\\qquad$ $\\langle u,v \\rangle_V = u^Tv$; $\\qquad \\qquad \\qquad \\qquad \\qquad \\qquad \\quad \\ $ $\\mathcal{F} = \\left\\{\\begin{pmatrix} 2\\\\0\\\\1\\\\1 \\end{pmatrix}, \\begin{pmatrix} 0\\\\1\\\\-1\\\\1 \\end{pmatrix}, \\begin{pmatrix} 1\\\\0\\\\-1\\\\-1 \\end{pmatrix}, \\begin{pmatrix} 0\\\\2\\\\1\\\\-1 \\end{pmatrix}\\right\\}$\n",
"\n",
"4. $\\quad$ $V = \\mathbb{R}^5$; $\\qquad$ $\\langle u,v \\rangle_V = u^Tv$; $\\qquad \\qquad \\qquad \\qquad \\qquad \\qquad \\quad \\ $ $\\mathcal{F} = \\left\\{\\begin{pmatrix} \\frac{\\sqrt{7}}{7}\\\\0\\\\\\frac{2\\sqrt{7}}{7}\\\\\\frac{\\sqrt{7}}{7}\\\\-\\frac{\\sqrt{7}}{7} \\end{pmatrix}, \\begin{pmatrix} \\frac{\\sqrt{3}}{3} \\\\ -\\frac{\\sqrt{3}}{3} \\\\ 0 \\\\ -\\frac{\\sqrt{3}}{3} \\\\ 0 \\end{pmatrix}, \\begin{pmatrix} 0 \\\\ \\frac{\\sqrt{3}}{3} \\\\ 0 \\\\ -\\frac{\\sqrt{3}}{3} \\\\ -\\frac{\\sqrt{3}}{3} \\end{pmatrix} \\right\\}$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"corrections.Ex1Chapitre9_5()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercice 2\n",
"\n",
"Considérez les familles de fonctions suivantes et déterminez si elles sont des familles/bases ortogonales/orthonormées, par rapport au produit scalaire donnée.\n",
"\n",
"1. $\\quad$ $V = \\mathbb{P}^3(\\mathbb{R})$; $\\qquad \\qquad \\ \\ \\ $ $\\langle f,g \\rangle_V = \\int_0^1 f(x)g(x) \\ dx$; $\\qquad \\qquad \\qquad \\qquad $ $\\mathcal{F} = \\left\\{1, x, x^2, x^3\\right\\}$\n",
"\n",
"2. $\\quad$ $V = \\mathbb{P}^4(\\mathbb{R})$; $\\qquad \\qquad \\ \\ \\ $ $\\langle f,g \\rangle_V = \\int_0^1 f(x)g(x) \\ dx$; $\\qquad \\qquad \\qquad \\qquad $ $\\mathcal{F} = \\left\\{1, \\ x-\\frac{1}{2}, \\ x^2-x+\\frac{1}{6}, \\ x^3 - \\frac{3}{2}x^2 + \\frac{3}{5}x - \\frac{1}{20}\\right\\}$\n",
"\n",
"3. $\\quad$ $V = \\mathbb{P}^2(\\mathbb{R})$; $\\qquad \\qquad \\ \\ \\ $ $\\langle f,g \\rangle_V = \\int_{-1}^1 (1-x^2)f(x)g(x) \\ dx$; $\\qquad \\qquad \\quad$ $\\mathcal{F} = \\left\\{\\frac{\\sqrt{3}}{2}, \\sqrt{\\frac{15}{2}}x, \\frac{5\\sqrt{7}}{7}x^2 - \\frac{\\sqrt{7}}{14}\\right\\}$\n",
"\n",
"4. $\\quad$ $V = \\mathcal{C}\\left([-\\pi;\\pi]; \\mathbb{R}\\right)$; $\\qquad$ $\\langle f,g \\rangle_V = \\int_{-\\pi}^{\\pi} f(x)g(x) \\ dx$; $\\qquad \\qquad \\qquad \\quad \\ \\ \\ $ $\\mathcal{F} = \\{\\sin(kx)\\}_{k=1}^{+\\infty} \\cup \\{\\cos(kx)\\}_{k=0}^{+\\infty}$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"corrections.Ex2Chapitre9_5()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercice 3\n",
"\n",
"Considerez les $\\mathbb{R}$-espaces vectoriels $D$-dimensionnels suivant $V$, équipés de la base $\\mathcal{B} = \\{b_i\\}_{i=1}^D$ et avec le produit scalaire $\\langle \\cdot, \\cdot \\rangle_V$. Pour l'élément donné $v \\in V$, calculez ses coordonnées par rapport aux éléments de la base $\\mathcal{B}$ i.e. les coefficients réels $\\left\\{([v]_{\\mathcal{B}})_i\\right\\}_{i=1}^D$, telles que $$v = \\sum\\limits_{i=1}^D ([v]_{\\mathcal{B}})_ib_i$$\n",
"\n",
"1. $\\quad$ $V = \\mathbb{R}^3$ $\\qquad$ $\\mathcal{B} =\\left\\{\\begin{pmatrix}2 \\\\ 0 \\\\ 1 \\end{pmatrix}, \\begin{pmatrix} 0 \\\\ 1 \\\\ -1 \\end{pmatrix}, \\begin{pmatrix} 1 \\\\ 1 \\\\ 0 \\end{pmatrix}\\right\\}$ $\\qquad \\qquad \\qquad \\qquad \\quad \\ \\ $ $\\langle u,v \\rangle_V = u^Tv$ $\\qquad \\qquad \\qquad \\qquad \\ \\ \\ $ $v = \\begin{pmatrix} 1 \\\\ 1 \\\\ 1 \\end{pmatrix}$\n",
"\n",
"2. $\\quad$ $V = \\mathbb{R}^4$ $\\qquad$ $\\mathcal{B} = \\left\\{\\begin{pmatrix} 2\\\\0\\\\1\\\\1 \\end{pmatrix}, \\begin{pmatrix} 0\\\\1\\\\-1\\\\1 \\end{pmatrix}, \\begin{pmatrix} 1\\\\0\\\\-1\\\\-1 \\end{pmatrix}, \\begin{pmatrix} 0\\\\2\\\\1\\\\-1 \\end{pmatrix}\\right\\}$ $\\qquad \\qquad \\qquad \\ $ $\\langle u,v \\rangle_V = u^Tv$ $\\qquad \\qquad \\qquad \\qquad \\ \\ \\ $ $v = \\begin{pmatrix} -1 \\\\ 0 \\\\ 2 \\\\ -2 \\end{pmatrix}$\n",
"\n",
"3. $\\quad$ $V = \\mathbb{P}^3(\\mathbb{R})$ $\\ \\ \\ $ $\\mathcal{B} = \\left\\{1, \\ x-\\frac{1}{2}, \\ x^2-x+\\frac{1}{6}, \\ x^3 - \\frac{3}{2}x^2 + \\frac{3}{5}x - \\frac{1}{20}\\right\\}$ $\\ \\ $ $\\langle f,g \\rangle_V = \\int_0^1 f(x)g(x) \\ dx$; $\\qquad \\qquad$ $v(x) = x^3 - x^2 + x - 1$\n",
"\n",
"4. $\\quad$ $V = \\mathbb{P}^2(\\mathbb{R})$ $\\ \\ \\ $ $\\mathcal{B} = \\left\\{\\frac{\\sqrt{3}}{2}, \\sqrt{\\frac{15}{2}}x, \\frac{5\\sqrt{7}}{7}x^2 - \\frac{\\sqrt{7}}{14}\\right\\}$ $\\qquad \\qquad \\qquad \\quad $ $\\langle f,g \\rangle_V = \\int_{-1}^1 (1-x^2)f(x)g(x) \\ dx$; $\\quad$ $v(x) = x^2+x+1$\n",
"\n",
"**EXTRA**: Dans quel cas, sur les deux derniers, la norme de $v$ peut être rapidement calculée et comment?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## HINT\n",
"Dans le cas général (en supposant que $\\mathcal{B}$ est une base de $V$!), les coefficients d'expansion peuvent être calculés en résolvant le système linéaire $D$-dimensionnel suivant\n",
"\n",
"$$\n",
"\\begin{pmatrix}\n",
"\\langle b_1, b_1 \\rangle & \\langle b_1, b_2 \\rangle & \\dots & \\langle b_1, b_D \\rangle \\\\\n",
"\\langle b_2, b_1 \\rangle & \\langle b_2, b_2 \\rangle & \\dots & \\langle b_2, b_D \\rangle \\\\\n",
"\\vdots & \\ddots & \\ddots & \\vdots \\\\\n",
"\\langle b_D, b_1 \\rangle & \\langle b_D, b_2 \\rangle & \\dots & \\langle b_D, b_D \\rangle \\\\\n",
"\\end{pmatrix}\n",
"\\begin{pmatrix}\n",
"([v]_{\\mathcal{B}})_1\\\\\n",
"([v]_{\\mathcal{B}})_2\\\\\n",
"\\vdots \\\\\n",
"([v]_{\\mathcal{B}})_D\n",
"\\end{pmatrix} \n",
"=\n",
"\\begin{pmatrix}\n",
"\\langle v, b_1 \\rangle \\\\\n",
"\\langle v, b_2 \\rangle \\\\\n",
"\\vdots \\\\\n",
"\\langle v, b_D \\rangle \\\\\n",
"\\end{pmatrix}\n",
"$$\n",
"\n",
"Mais les choses peuvent être beaucoup plus faciles si $\\mathcal{B}$ est une base orthogonale ou orthonormée de $V$ (voir la proposition 1)!"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"C'est faux! N'oubliez pas d'insérer tous les résultats avec 4 chiffres après la virgule"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3dc7b694007d4a67a3aa63ffec0f23c4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Solution', style=ButtonStyle()),))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9546a20e9ebe48beba4835ef7e518217",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# CAS 1\n",
"v_B = [0,0,0] # INSÉREZ ICI VOTRE RÉSULTAT. UTILISEZ 4 CHIFFRES APRÈS LA VIRGULE!\n",
"corrections.Ex3Chapitre9_5(v_B, case_nb=1)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"C'est faux! N'oubliez pas d'insérer tous les résultats avec 4 chiffres après la virgule"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e7452e24911740169654adabc749afc0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Solution', style=ButtonStyle()),))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "47eea8ebf4e046f5945bb3f60f477e76",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# CAS 2\n",
"v_B = [0,0,0,0] # INSÉREZ ICI VOTRE RÉSULTAT. UTILISEZ 4 CHIFFRES APRÈS LA VIRGULE!\n",
"corrections.Ex3Chapitre9_5(v_B, case_nb=2)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"C'est faux! N'oubliez pas d'insérer tous les résultats avec 4 chiffres après la virgule"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "931c62641d6446708522b6e6a63d1fe7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Solution', style=ButtonStyle()),))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eebb9a6564fc40e18e035bc5a63ed75b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# CAS 3\n",
"v_B = [0,0,0,0] # INSÉREZ ICI VOTRE RÉSULTAT. UTILISEZ 4 CHIFFRES APRÈS LA VIRGULE!\n",
"corrections.Ex3Chapitre9_5(v_B, case_nb=3)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"C'est faux! N'oubliez pas d'insérer tous les résultats avec 4 chiffres après la virgule"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "57dd48a3f695451db098ef40d83370b2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Solution', style=ButtonStyle()),))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f0447eb161334ef9ae295ec49a37bf41",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# CAS 4\n",
"v_B = [0,0,0] # INSÉREZ ICI VOTRE RÉSULTAT. UTILISEZ 4 CHIFFRES APRÈS LA VIRGULE!\n",
"corrections.Ex3Chapitre9_5(v_B, case_nb=4)"
]
},
{
- "cell_type": "code",
- "execution_count": null,
+ "cell_type": "markdown",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "[Passez au notebook du chapitre 9.6-9.7: Comment trouver une base orthogonale/orthonormale: le procèdè de Gram-Schmidt](./9.6-9.7%20Comment%20trouver%20une%20base%20orthogonale%20au%20orthonormale%20-%20Le%20procédé%20de%20Gram-Schmidt.ipynb)"
+ ]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
diff --git "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.6-9.7 Comment trouver une base orthogonale au orthonormale - Le proc\303\251d\303\251 de Gram-Schmidt.ipynb" "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.6-9.7 Comment trouver une base orthogonale au orthonormale - Le proc\303\251d\303\251 de Gram-Schmidt.ipynb"
index f828f07..571cc95 100644
--- "a/Chapitre 9 - Produits scalaires et espaces euclidens/9.6-9.7 Comment trouver une base orthogonale au orthonormale - Le proc\303\251d\303\251 de Gram-Schmidt.ipynb"
+++ "b/Chapitre 9 - Produits scalaires et espaces euclidens/9.6-9.7 Comment trouver une base orthogonale au orthonormale - Le proc\303\251d\303\251 de Gram-Schmidt.ipynb"
@@ -1,32 +1,82 @@
{
"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# **Concept(s)-clé(s) et théorie**"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Exercises et Exemples"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ " \n",
+ " "
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import Librairie.AL_Fct as al\n",
+ "import Corrections.corrections as corrections\n",
+ "import numpy as np"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}