RepozytoriumzprojektemPython/stopy/Ćwiczenia_10.ipynb

722 lines
507 KiB
Plaintext
Raw Normal View History

2024-12-11 08:36:13 +01:00
{
"cells": [
{
"cell_type": "markdown",
"id": "4cc6c96f",
"metadata": {},
"source": [
"# Ćwiczenia 10"
]
},
{
"cell_type": "markdown",
"id": "1276423e",
"metadata": {},
"source": [
"***TEMAT:*** całki podwójne"
]
},
{
"cell_type": "markdown",
"id": "e3d9e3c2",
"metadata": {},
"source": [
"## Całka podwójna po prostokącie"
]
},
{
"cell_type": "markdown",
"id": "1bcce97a",
"metadata": {},
"source": [
"### Definicja: sumy dolne, sumy górne, całka"
]
},
{
"cell_type": "markdown",
"id": "64ff5ed6",
"metadata": {},
"source": [
"#### Przykład:\n",
"\n",
"Korzystając z definicji obliczymy \n",
"\n",
"$$\\iint_{[0,1]\\times [0,1]}xydxdy.$$"
]
},
{
"cell_type": "markdown",
"id": "cf058d53",
"metadata": {},
"source": [
"__UWAGA:__ Sumy dolne, sumy górne, całkę dolną, całkę górną i całkę po prostokącie definiuje się w identycznycny sposób jak odpowiedniki tych pojęć dla przedziału. "
]
},
{
"cell_type": "markdown",
"id": "1fdd0220",
"metadata": {},
"source": [
"1. Dzielimy prostokąt $[0,1]\\times [0,1]$ na $n^2$ mniejszych prostokątów o równych polach \n",
"w następujący sposób (rysunek dla $n=5$), podział ten nazywamy podziałem $P_n$."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "29b88b52",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAIjCAYAAAA6HaCyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAABF70lEQVR4nO3deVjU5f7/8RegDC7gkmwigvuunNwOdswsDbU067icLBcqrdRSKSuzQrM0zeNySjNNs69ZuZwyS8JM5ZRpWW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mamzp49m5tNdtqzZ4+qVKmiiIgIt8cufb/Kec9ISkpyvmc0atTI+bz48MMP1ahRI/n5+alp06batGmTy/w//PCD+vXrp+rVqzsP9TzwwAM6ceJEnmrOkZGRofj4eNWsWVMOh0Ph4eF66qmn3J5LOedGzZ8/Xw0aNJDD4VBiYqLHZe7bt0/GGN10001uj3l5ebn15Mcff9Stt96qUqVKqUqVKnrppZc0Z84ct3NYLn1PzxEZGal+/fo5fz958qSefPJJNWrUSGXLllVAQIA6duzo9j6U85r84IMP9NxzzyksLEylS5dWWlqapNy9btLT0zV06FBFRkbK4XAoKChI7du318aNGz32pqhwCCYPIiIitG7dOm3btk0NGza84rQPPfSQ3n33XfXq1UutWrXSqlWr3M6byKs33nhDDRo0UJcuXVSiRAl98sknGjhwoLKzszVo0CCXaXft2qV7771XDz/8sPr37686dero3LlzatOmjZKTk/Xwww+ratWqWrt2rUaMGKEjR45oypQp+apr06ZNKlOmjOrVq+cynnPexKZNm656WKIwPPfcc/rkk0/04IMPauvWrfL399fy5cs1a9YsjRkzRk2aNMnXcjdt2qTatWsrICDAZTxnezdv3qzw8PBrrr+gRUdHq0aNGlc8V6Vnz56aNm2ali1bpu7duzvHz507p08++UT9+vWTj4+Px3nPnz+v2267TQcPHtTjjz+uypUra968eVq1apXbtKtWrVLHjh3VtGlTZ1DMCdhfffWVs5dbt27V7bffrsDAQI0aNUoXL15UfHy8goODr6kX7733ntLT0/Xwww/Ly8tLEyZM0D333KO9e/eqZMmSevjhh/XLL79oxYoVbufgGGPUpUsXrV69Wg8++KCioqK0fPlyDR8+XMnJyZo8eXKe60lJSZEkj+c2rVq1SqVLl1ZWVpYiIiI0bNgwDRky5KrLjIiI0BdffKFVq1bp1ltvver0u3fvVq9evfTwww/r/vvv18SJE9W5c2fNmDFDzz77rPMDxrhx49SjRw/t2rVL3t6/f4ZdsWKF9u7dq9jYWIWEhOjHH3/UzJkz9eOPP+qbb77J1QnDObKzs9WlSxetWbNGAwYMUL169bR161ZNnjxZP/30k5YsWeLWn4ULF2rw4MGqVKnSZU86zgliixYtUvfu3VW6dOnL1pCSkqK2bdvq4sWLeuaZZ1SmTBnNnDnT7fBYXuzdu1dLlixR9+7dVa1aNaWmpurNN99UmzZttH37dlWuXNll+jFjxsjX11dPPvmkMjIy5Ovrm+vXzSOPPKLFixdr8ODBql+/vk6cOKE1a9Zox44duvHGG/O9DQWuiPfAXFc+//xz4+PjY3x8fEx0dLR56qmnzPLly01mZqbLdJs3bzaSzMCBA13Ge/Xq5XYYo2/fviYiIsJtXZ52MXs6jBITE2OqV6/uMhYREWEkmcTERJfxMWPGmDJlypiffvrJZfyZZ54xPj4+5uDBg5fddmMufwjmjjvucKvBGGPOnj1rJJlnnnnmisv9o4I+BLN161bj6+trHnroIXPq1CkTFhZmmjVrZi5cuHDF+a50CKZBgwbm1ltvdRv/8cc
"text/plain": [
"<Figure size 600x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"# Define the square grid [0,1] x [0,1] divided into 25 equal squares\n",
"n = 5 # 5x5 grid\n",
"x = np.linspace(0, 1, n+1)\n",
"y = np.linspace(0, 1, n+1)\n",
"\n",
"# Plot the grid\n",
"fig, ax = plt.subplots(figsize=(6, 6))\n",
"for i in x:\n",
" ax.plot([i, i], [0, 1], color=\"black\", linewidth=0.8) # Vertical lines\n",
"for j in y:\n",
" ax.plot([0, 1], [j, j], color=\"black\", linewidth=0.8) # Horizontal lines\n",
"\n",
"# Set aspect ratio and limits\n",
"ax.set_aspect('equal', adjustable='box')\n",
"ax.set_xlim(0, 1)\n",
"ax.set_ylim(0, 1)\n",
"ax.set_title(\"Square [0,1] x [0,1] Divided into 25 Smaller Squares\")\n",
"ax.set_xlabel(\"x-axis\")\n",
"ax.set_ylabel(\"y-axis\")\n",
"plt.grid(False) # Disable the background grid\n",
"\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"id": "0ce9ffdb",
"metadata": {},
"source": [
"2. Dla $1\\leq i\\leq n$ oraz $1\\leq j\\leq n$ niech \n",
"\n",
"$$\n",
"P_{i,j}=\\left[\\frac{i-1}{n},\\frac{i}{n}\\right]\\times\\left[\\frac{j-1}{n},\\frac{j}{n}\\right].\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "3782244e",
"metadata": {},
"source": [
"3. Dla $1\\leq i\\leq n$ oraz $1\\leq j\\leq n$ mamy\n",
"\n",
"$$\n",
"\\inf_{(x,y)\\in P_{i,j}} f(x,y)=\\inf_{(x,y)\\in P_{i,j}} xy=\\frac{(i-1)(j-1)}{n^2}\n",
"$$\n",
"\n",
"oraz\n",
"\n",
"$$\n",
"\\sup_{(x,y)\\in P_{i,j}} f(x,y)=\\sup_{(x,y)\\in P_{i,j}} xy=\\frac{ij}{n^2}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "1251d3c1",
"metadata": {},
"source": [
"4. Mamy (korzystając ze wzoru na sumę ciągu arytmetycznego)\n",
"\n",
"$$\n",
"L(f,P_n)=\\sum_{i=1}^n\\sum_{j=1}^n \\frac{1}{n^2}\\cdot \\inf_{(x,y)\\in P_{i,j}}f(x,y)=\n",
"\\sum_{i=1}^n\\sum_{j=1}^n \\frac{(i-1)(j-1)}{n^4}=\\frac{(n-1)^2}{4n^2}\\xrightarrow{n\\to\\infty}\\frac{1}{4}\n",
"$$\n",
"\n",
"oraz \n",
"\n",
"$$\n",
"U(f,P_n)=\\sum_{i=1}^n\\sum_{j=1}^n \\frac{1}{n^2}\\cdot \\sup_{(x,y)\\in P_{i,j}}f(x,y)=\n",
"\\sum_{i=1}^n\\sum_{j=1}^n \\frac{ij}{n^4}=\\frac{(n+1)^2}{4n^2}\\xrightarrow{n\\to\\infty}\\frac{1}{4}.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "a3b52dbe",
"metadata": {},
"source": [
"5. Rachunki powyżej implikują, że \n",
"\n",
"$$\n",
"\\iint_{[0,1]\\times [0,1]}xydxdy=\\frac{1}{4}.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "543cca36",
"metadata": {},
"source": [
"### Twierdzenie Fubiniego dla prostokąta.\n",
"\n",
"__Twierdzenie.__ \n",
"Jeśli $f(x,y)$ jest funkcją ciągłą na prostokącie $R=[a,b] \\times [c,d]$, to całkę podwójną można obliczyć poprzez całki iterowane:\n",
"\n",
"$$ {\\color{red}{\n",
"\\iint_R f(x,y) \\, dxdy = \\int_a^b \\int_c^d f(x,y) \\, dy \\, dx =\\int_c^d \\int_a^b f(x,y) \\, dx \\, dy. }}\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "70e22e12",
"metadata": {},
"source": [
"#### Zadanie 1\n",
"\n",
"Obliczymy \n",
"\n",
"$$\n",
"\\iint_{[0,1]\\times [0,1]} xydxdy.\n",
"$$\n"
]
},
{
"cell_type": "markdown",
"id": "aa5e2fd0",
"metadata": {},
"source": [
"##### Rozwiązanie:\n",
"Z twierdzenia Fubiniego wynika, że \n",
"\n",
"$$\\iint_{[0,1]\\times [0,1]} xydxdy=\\int_0^1\\int_0^1xydydx=\n",
"\\int_0^1\\frac{xy^2}{2}\\biggr|_{y=0}^{y=1}dx=\n",
"\\int_0^1 \\frac{x}{2}dx=\\frac{x^2}{4}\\biggr|_{x=0}^{x=1}=\\frac{1}{4}. \n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "540a109a",
"metadata": {},
"source": [
"#### Zadanie 2\n",
"\n",
"Obliczymy \n",
"\n",
"$$\n",
"\\iint_{[1,4]\\times [2,3]} (2x+4y)dxdy.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "6ec05c7d",
"metadata": {},
"source": [
"##### Rozwiązanie:\n",
"__I sposób__\n",
"$$\n",
"\\iint_{[1,4]\\times [2,3]} (2x+4y)dxdy=\\int_1^4\\int_2^3(2x+4y)dydx=\n",
"\\int_1^4 2xy+2y^2\\biggr|_{y=2}^{y=3}dx=\\int_1^42x+10dx=\n",
"x^2+10x\\biggr|_{x=1}^{x=4}=45.\n",
"$$\n",
"\n",
"__II sposób__\n",
"$$\n",
"\\iint_{[1,4]\\times [2,3]} (2x+4y)dxdy=\\int_2^3\\int_1^4(2x+4y)dxdy=\n",
"\\int_2^3 x^2+4yx\\biggr|_{x=1}^{x=4}dy=\\int_2^3 15+12y dy=\n",
"15y +6y^2\\biggr|_{y=2}^{y=3}=45.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "c5c2e7a8",
"metadata": {},
"source": [
"### UWAGA!!!\n",
"\n",
"Czasami wybór kolejności całkowania ma istotne znaczenie!"
]
},
{
"cell_type": "markdown",
"id": "34ca0028",
"metadata": {},
"source": [
"#### Zadanie 3\n",
"\n",
"Obliczymy \n",
"\n",
"$$\n",
"\\iint_{[-1,1]\\times [0,2]} xe^{y^2}dxdy.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "bdc0512f",
"metadata": {},
"source": [
"##### Rozwiązanie:\n",
"Gdybyśmy najpierw chcieli całkować \"po y\", to musielibyśmy zmierzyć się z całką $\\int e^{y^2}dy\\ldots$.\n",
"Dlatego robimy tak:\n",
"\n",
"$$\n",
"\\iint_{[-1,1]\\times [0,2]} xe^{y^2}dxdy=\\int_0^2\\int_{-1}^1 xe^{y^2}dxdy=\n",
"\\int_0^2\\frac{x^2e^{y^2}}{2}\\biggr|_{x=-1}^{x=1}=0.\n",
"$$\n"
]
},
{
"cell_type": "markdown",
"id": "5eaec7e6",
"metadata": {},
"source": [
"### Zadanie domowe (z wykładu):\n",
"\n",
"1. Obliczyć $ \\int_1^4 \\int_0^2 \\left(6x^2 y - 2x\\right) \\, dy \\, dx$.\n",
"2. Obliczyć $\\int_1^3 \\int_1^5 \\dfrac{\\ln y}{xy} \\, dy \\, dx$.\n",
"3. Obliczyć $ \\int_0^1 \\int_1^2 \\left( x + e^{-y} \\right) \\, dx \\, dy$."
]
},
{
"cell_type": "markdown",
"id": "b08fa672",
"metadata": {},
"source": [
"## Zastosowanie"
]
},
{
"cell_type": "markdown",
"id": "3c3c8fba",
"metadata": {},
"source": [
"### Objętość\n",
"\n",
"Niech $f$ oraz $g$ będą funkcjami ciągłymi na prostokącie $[a,b]\\times [c,d]$ takimi , że \n",
"\n",
"$$\n",
"f(x,y)\\leq g(x,y) \\quad\\text{dla}\\quad (x,y)\\in [a,b]\\times [c,d].\n",
"$$\n",
"\n",
"Objętość bryły\n",
"\n",
"$$\n",
"E=\\{(x,y,z): (x,y)\\in [a,b]\\times [c,d], f(x,y)\\leq z\\leq g(x,y)\\}\n",
"$$\n",
"\n",
"wyraża się wzorem\n",
"\n",
"$$\n",
"\\iint_{[a,b]\\times [c,d]}(g(x,y)-(f(x,y))dxdy.\n",
"$$\n"
]
},
{
"cell_type": "markdown",
"id": "4b6ddb20",
"metadata": {},
"source": [
"#### Zadanie 4"
]
},
{
"cell_type": "markdown",
"id": "0f22cdf5",
"metadata": {},
"source": [
"Obliczymy objętość prostopadłościanu $[0,1]\\times [0,1]$ \"ściętego z góry\" płaszczyzną $x+y+z=3$ a z dołu płaszczyzną $z=0$"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "28e06198",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoUAAAKSCAYAAACk+qH3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOy9d5gkZbn+f1fnnCbnPLM5zSZ2gQUks+yyCgiusODhmEW/gv6OiqKHox4jBo4o6jkgQRREFEFhw2yazWlyzjM9uXP3dKp6f3/MVG2nyaln9/1c11ywHarf7q6uuusJ98MQQggoFAqFQqFQKFc1osVeAIVCoVAoFApl8aGikEKhUCgUCoVCRSGFQqFQKBQKhYpCCoVCoVAoFAqoKKRQKBQKhUKhgIpCCoVCoVAoFAqoKKRQKBQKhUKhgIpCCoVCoVAoFAqoKK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Dr1q2LsCrKgrDYqnQps2/fPiKRSEh/f3/UfTt37iRarZZ4PB5CSOyr6rNnz5Jbb72VJCQkEIVCQXJzc8mjjz4q3M9f/UZG2dra2ggA8n//93/CbRUVFWTfvn0kLy+PyOVykpKSQh599NGoq/JY69ixYwfZsWOH8O+cnJyYkYPQtbS3t5PPfOYzpLi4mCgUCmIymci9994btl3+tcbbRuTrEkJIf38/+cQnPkGSk5OJXC4na9asIS+++GLM9/+jH/2I/OY3vyH5+flEJpORjRs3kjNnzkR9F7FoaWkh9957LzEajUSpVJItW7aQf/zjH5OuPRb8eiL/+KghHyns7u4mu3fvJmq1miQmJpInnniCBIPBsG2xLEueffZZsmLFCiKXy0lycjL55Cc/SSwWy6Tvqbe3lzzyyCMkIyODyGQykpqaSnbt2hUVyXnvvffItddeS1QqFdFoNOTOO+8k1dXVwv379u2b8L2bzWZSV1dH/H7/hOv51re+RRiGIQcOHAi7/d///d+JVColly5dmvD5drud5OXlkWuvvZZYrdZJ3/9ETBTV2rRpE9m0aVPU7bfeeispKCiY1utMJcI606gWx3EkJyeH7Nq1K+q+kZERotPpyCc/+ckJt0E/02hqamoIAPI///M/Ybf39PQQAOSZZ56Z9jZDGRgYIC+99BK5//77ydGjRyd87FSOvTPBbreTN954gzzyyCPkT3/604y28eabbxIA5J///OeEj+vv7yeJiYlkx44dYZmxpqYmolKpyP333z/uc+diH6fMDhopnAV79+7FSy+9hD//+c/4/Oc/L9xusVjw/vvv48EHH4RSqYz53IGBAdx6661ISkrCf/zHf8BgMKC9vR1vvfXWjNayf/9+tLa24tFHH0VqaipqamrwwgsvoKamBqdOnRq3JicWP/vZz6JqR5599llcunQJCQkJAICzZ8/ixIkTeOCBB5CZmYn29nY8//zzuOGGG1BbWwuVSoXrr78ejz/+OH7xi1/g61//OpYvXw4Awn8jGRkZwQ033IDm5mZ8/vOfR15eHt544w088sgjsNls+OIXvxj2+Ndeew1OpxOf+tSnwDAMfvjDH+LDH/4wWltbIZVKx31//f392LZtGzweD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tu3btIrm5uZPWLNPPNJof/ehHBADp7OyMum/Tpk1k69atk27D4XCQt956i/zbv/0bSUtLIwCIVqslH/7wh8nvf/970tfXN+11ERL72DseIyMj5J///Cf5/Oc/T/Ly8ggAolAoyO23306ee+65Kf1eQ+GP5/xfSUnJtKKVDz74IFGpVKSxsVH4jN9+++1JnzfbfZwyO2ikcBaIxWI88MADePbZZ9He3i5ETV577TWkpKTgQx/60LjP5a/S//GPf2Dt2rUTRoCmQmhE0uv1wuVyCXUfFy5cwHX
"text/plain": [
"<Figure size 800x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits.mplot3d import Axes3D\n",
"\n",
"# Define the range for x and y\n",
"x = np.linspace(0, 1, 30)\n",
"y = np.linspace(0, 1, 30)\n",
"x, y = np.meshgrid(x, y)\n",
"\n",
"# Define the bounds for z\n",
"z_upper = 3 - x - y\n",
"z_lower = np.zeros_like(z_upper)\n",
"\n",
"# Create a 3D plot\n",
"fig = plt.figure(figsize=(8, 8))\n",
"ax = fig.add_subplot(111, projection='3d')\n",
"\n",
"# Plot the surfaces\n",
"ax.plot_surface(x, y, z_upper, alpha=0.7, color='blue', edgecolor='k', label=\"z = 3 - x - y\")\n",
"ax.plot_surface(x, y, z_lower, alpha=0.3, color='cyan', edgecolor='k', label=\"z = 0\")\n",
"\n",
"# Set labels and limits\n",
"ax.set_xlabel('X-axis')\n",
"ax.set_ylabel('Y-axis')\n",
"ax.set_zlabel('Z-axis')\n",
"ax.set_xlim(0, 1)\n",
"ax.set_ylim(0, 1)\n",
"ax.set_zlim(0, 3)\n",
"\n",
"# Title\n",
"ax.set_title('Visualization of the set: x ∈ [0,1], y ∈ [0,1], 0 ≤ z ≤ 3-x-y')\n",
"\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"id": "e7f0cc7a",
"metadata": {},
"source": [
"##### Rozwiązanie:\n",
"\n",
"Musimy obliczyć \n",
"\n",
"$$\n",
"\\iint_{[0,1]\\times [0,1]}(3-x-y)dxdy.\n",
"$$\n",
"\n",
"Mamy\n",
"\n",
"$$\n",
"\\iint_{[0,1]\\times [0,1]}(3-x-y)dxdy=\\int_0^1\\int_0^1(3-x-y)dydx=\n",
"\\int_0^1 3y-xy-\\frac{y^2}{2}\\biggr|_{y=0}^{y=1}dx=\n",
"\\int_0^1 \\frac{5}{2}-xdx=\\frac{5}{2}x-\\frac{x^2}{2}\\biggr|_{x=0}^{x=1}=2.\n",
"$$\n"
]
},
{
"cell_type": "markdown",
"id": "c50d6b0a",
"metadata": {},
"source": [
"## Całka podwójna po obszarze"
]
},
{
"cell_type": "markdown",
"id": "ff3d0827",
"metadata": {},
"source": [
"### Przypomnienie z wykładu\n",
"\n",
"Niech $f$ będzie funkcją określoną i ograniczoną na obszarze ograniczonym $D\\subset\\mathbb{R}^2$ oraz niech $R$ będzie dowolnym prostokątem zawierającym obszar $D.$ Ponadto niech funkcja $f^{\\ast}$ będzie rozszerzeniem funkcji $f$ z $D$ na $R$ określonym wzorem:\n",
"\n",
"$$\n",
"f^{\\ast}(x,y)=\\begin{cases}f(x,y)\\quad {\\rm dla}\\quad (x,y)\\in D\\\\ 0\\;\\,\\qquad\\quad {\\rm dla}\\quad (x,y)\\in R\\setminus D.\\end{cases}\n",
"$$\n",
"__Całkę podwójną__ funkcji $f$ po obszarze $D$ definiujemy wzorem:\n",
"\n",
"$$\n",
"\\displaystyle\\iint\\limits_Df(x,y) \\; dxdy=\\iint\\limits_Rf^{\\ast}(x,y) \\; dxdy\n",
"$$\n",
"\n",
" o ile całka poprawej stronie istnieje. Mówimy wtedy, że funkcja $f$ jest całkowalna na obszarze $D.$"
]
},
{
"cell_type": "markdown",
"id": "aa7bd785",
"metadata": {},
"source": [
"### Zbiory normalne\n",
"\n",
"__Obszar normalny__ względem osi $OX$ to zbiór punktów $(x,y)$ spełniających warunek\n",
"\n",
"$$\n",
"\\begin{cases}a\\leq x\\leq b\\\\f(x)\\leq y\\leq g(x),\\end{cases}\n",
"$$\n",
"\n",
"a obszar normalny względem osi $OY$ to następujący zbiór punktów\n",
"\n",
"$$\n",
"\\begin{cases}c\\leq y\\leq d\\\\ f(y)\\leq x\\leq g(y),\\end{cases}\n",
"$$\n",
"gdzie funkcje $f$ oraz $g$ są ciągłe."
]
},
{
"cell_type": "markdown",
"id": "25754b0c",
"metadata": {},
"source": [
"#### Zadanie 5"
]
},
{
"cell_type": "markdown",
"id": "16ef10ce",
"metadata": {},
"source": [
"Czy poniższe zbiory są normalne względem którejś z osi:\n",
"\n",
"1. Zbiór $D$ to trójkąt o wierzchołkach w punktach $(0,0)$, $(1,0)$, $(1,4)$.\n",
"2. Zbiór $D$ to koło ośrodku w punkcie $(0,0)$ i promieniu $2$.\n",
"3. Zbiór $D$ to zbiór znajdujący się pomiędzy krzywą $y=x^2$ a prostą $y=1$.\n",
"4. Zbiór $D$ to zbiór znajdujący się pomiędzy krzywą $x=y^2$ a prostą $x=1$.\n",
"5. Zbiór $D$ to kwadrat o wierzchołkach w punktach $(-1,0)$, $(1,0)$, $(0,-1)$, $(0,1)$."
]
},
{
"cell_type": "markdown",
"id": "1dcfd799",
"metadata": {},
"source": [
"##### Rozwiązanie:"
]
},
{
"cell_type": "markdown",
"id": "23b46f13",
"metadata": {},
"source": [
"1. Mamy \n",
"\n",
"$$D=\\{(x,y): 0\\leq x\\leq 1, 0\\leq y\\leq 4x\\}$$\n",
"\n",
"oraz\n",
"\n",
"$$\n",
"D=\\{(x,y): 0\\leq y\\leq 4, \\frac{y}{4}\\leq x\\leq 1\\}.\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "401d4908",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAAIlCAYAAADG2HBFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6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YYc9ttt13SG8DCw8OzBNHExEQTHR2d6xvACjvMZlxntl69epmPPcPevXvN4cOHc73fDF999VW266Ta7XbToEED065du4uefyEHDhwwS5cuzbym6/nWrFljgoKCzGOPPWaMMWbSpEkmNDTU/Prrr0U67l9dapj15/NnjDGffPKJAcz1119vypUrl+X7u6jGPnXqlFmzZk22r6ZNm5ratWubNWvWmO+//94YU3Q1Fimp9AYwkVJq2rRp9O7dm5UrVzJ27FgWLlzIf//7X9q1a8eoUaO48sorOXPmDDt37uTTTz/N/BPoo48+yoYNG7j++usZN24cHo+HFStW0KxZs4teUumxxx4jISGBG264gXvvvZeQkBBeeOEFHA4HTzzxRKE/xo8//piff/4Zt9vNiRMn+Oyzz0hISKBOnTp88MEHmW84ytCkSRPat2/Ppk2bLni/7dq1o3fv3sycOZOTJ0/SoEEDXn/9dQ4dOsQrr7yS63nHjh3jgw8+uOi8w8PDs80NYMeOHQwcOJCBAwfy4IMPAjB9+nSef/55Hn/8cV5++eUiGTfDihUrOHv2LMeOHQPgP//5D7/99hs
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Define the range for x\n",
"x = np.linspace(0, 1, 100)\n",
"\n",
"# Define the boundary for y\n",
"y = 4 * x\n",
"\n",
"# Create the plot\n",
"plt.figure(figsize=(8, 6))\n",
"plt.fill_between(x, 0, y, color=\"skyblue\", alpha=0.5, label=r\"$D = \\{(x,y): 0 \\leq x \\leq 1, 0 \\leq y \\leq 4x\\}$\")\n",
"plt.plot(x, y, color=\"blue\", label=r\"$y = 4x$\")\n",
"\n",
"# Add labels, title, and legend\n",
"plt.xlabel(\"x\")\n",
"plt.ylabel(\"y\")\n",
"plt.title(\"Region D: $0 \\leq x \\leq 1, 0 \\leq y \\leq 4x$\")\n",
"plt.legend()\n",
"plt.grid(True)\n",
"\n",
"# Show the plot\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"id": "01365abd",
"metadata": {},
"source": [
"2. Mamy\n",
"$$D=\\{(x,y): -2\\leq x\\leq 2, -\\sqrt{4-x^2}\\leq y\\leq \\sqrt{4-x^2}\\}$$\n",
"\n",
"oraz\n",
"\n",
"$$\n",
"D=\\{(x,y): -2\\leq y\\leq 2, -\\sqrt{4-y^2}\\leq x\\leq \\sqrt{4-y^2}\\}.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "8617403f",
"metadata": {},
"source": [
"3. Mamy\n",
"$$D=\\{(x,y): -1\\leq x\\leq 1, x^2\\leq y\\leq 1\\}$$\n",
"oraz \n",
"$$D=\\{(x,y): 0\\leq y\\leq 1, -\\sqrt{y}\\leq x\\leq \\sqrt{y}\\}.$$\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "71dd69d9",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAAInCAYAAACLENFOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAACKq0lEQVR4nOzdd3gUVdsG8Hu2Jptk03tCQu9NmiC8oNK7hd6bVAWi0pQuIIpYkSZNem9SI4qAgEgVEVCQDgmEQEL6Zne+P0LyEbOBJCR7tty/68rrm9nZPfecTDYPs+eckWRZlkFEREREZIMUogMQERERERUUi1kiIiIislksZomIiIjIZrGYJSIiIiKbxWKWiIiIiGwWi1kiIiIislksZomIiIjIZrGYJSIiIiKbxWKWiIiIiGwWi1kiIiIislksZomIyGalpqaib9++KFasGPR6PV588UUcOXJEdCwisiAWs0REZLPS09MRHh6OQ4cO4eHDhxgxYgTatGmDhIQE0dGIyEIkWZZl0SGIyPYtXboUffr0wZUrVxAeHi46DjmwoKAgbN++HTVq1BAdhYgsgFdmiezE0qVLIUlS1pdKpUJwcDB69+6NW7duiY5XZP573E5O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+7Qmk0GuWSJUvKJUuWlNPT02VZluXo6Gh56NChcmhoqKxWq+WAgAD51VdflRcsWJDtufv27ZOrV68uazQauWTJkvJ3330nv/vuu7KTk5PZ9p+8inry5Em
"text/plain": [
"<Figure size 800x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Define the range for x\n",
"x = np.linspace(-1, 1, 100)\n",
"\n",
"# Define the boundary for y\n",
"y_upper = np.ones_like(x) # y = 1\n",
"y_lower = x**2 # y = x^2\n",
"\n",
"# Create the plot\n",
"plt.figure(figsize=(8, 6))\n",
"plt.fill_between(x, y_lower, y_upper, color=\"skyblue\", alpha=0.5, label=r\"$D = \\{(x,y): -1 \\leq x \\leq 1, x^2 \\leq y \\leq 1\\}$\")\n",
"plt.plot(x, y_upper, color=\"blue\", label=r\"$y = 1$\")\n",
"plt.plot(x, y_lower, color=\"red\", label=r\"$y = x^2$\")\n",
"\n",
"# Add labels, title, and legend\n",
"plt.xlabel(\"x\")\n",
"plt.ylabel(\"y\")\n",
"plt.title(\"Region D: $-1 \\leq x \\leq 1, x^2 \\leq y \\leq 1$\")\n",
"plt.legend()\n",
"plt.grid(True)\n",
"\n",
"# Show the plot\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"id": "a61f2d80",
"metadata": {},
"source": [
"4. Mamy\n",
"$$D=\\{(x,y): -1\\leq y\\leq 1, y^2\\leq x\\leq 1\\}$$\n",
"oraz \n",
"$$D=\\{(x,y): 0\\leq x\\leq 1, -\\sqrt{x}\\leq y\\leq \\sqrt{x}\\}.$$\n"
]
},
{
"cell_type": "markdown",
"id": "d845490d",
"metadata": {},
"source": [
"5. Mamy\n",
"$$D=\\{(x,y): -1\\leq x\\leq 1, |x|-1\\leq y\\leq 1-|x|\\}$$\n",
"oraz \n",
"$$D=\\{(x,y): -1\\leq y\\leq 1, |y|-1\\leq x\\leq 1-|y|\\}.$$\n"
]
},
{
"cell_type": "markdown",
"id": "9a3bd752",
"metadata": {},
"source": [
"#### Zadanie 6"
]
},
{
"cell_type": "markdown",
"id": "04fcfaac",
"metadata": {},
"source": [
"Podaj przykład zbioru, który nie jest normalny względem żadnej z osi."
]
},
{
"cell_type": "markdown",
"id": "c3aa7415",
"metadata": {},
"source": [
"##### Rozwiązanie:\n",
"Przykładem takiego zbioru jest:\n",
"\n",
"$$D=\\{(x,y): 1\\leq x^2+y^2\\leq 4\\}.$$\n",
"\n",
"Zauważmy, że dzieląc ten zbiór prostą $y=0$ dostalibyśmy dwa zbiory normalne względem osi OX."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.2"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
}
},
"nbformat": 4,
"nbformat_minor": 5
}