В этом примере мы продемонстрируем решение нескольких простых задач из области математического анализа – построение касательных линий, символьное дифференцирование уравнений и нахождение якобиана системы уравнений.
Для начала, запустите подготовительную ячейку с кодом.
WARNING: using Plots.translate in module Main conflicts with an existing identifier.
Построение касательной линии¶
Найдите точку пересечения оси Y и прямой, являющейся касательной к синусоиде в точке $\pi/3$.
20.10 08:16:02.694 ⚠️ Framestyle :origin is not supported by Plotly and PlotlyJS. :zerolines was chosen instead.
Точка, в которой касательная пересекает ось ординат: (0, 0.34242662818613967)
Символьное дифференцирование¶
Продифференцируйте функцию $z(t) = t + t^2$.
Out[0]:
$$ \begin{equation}
1 + 2 t
\end{equation}
$$
Якобиан системы уравнений¶
Найдите якобиан системы линейных функций:
$$
\begin{array}{cc}
f_1 = a_{11} x_1 + a_{12} x_2 + a_{13} x_3 - b_1 \\
f_2 = a_{21} x_1 + a_{22} x_2 + a_{23} x_3 - b_2 \\
f_3 = a_{31} x_1 + a_{32} x_2 + a_{33} x_3 - b_3
\end{array}
$$
Out[0]:
$$ \begin{equation}
\left[
\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33} \\
\end{array}
\right]
\end{equation}
$$
{"id": "84500fd0-34ac-425f-aae5-7c3e53ca81c9", "data": [{"xaxis": "x", "colorbar": {"title": {"text": ""}}, "yaxis": "y", "x": [-3.141592653589793, -3.141592653589793, -3.041592653589793, -2.941592653589793, -2.8415926535897933, -2.741592653589793, -2.641592653589793, -2.541592653589793, -2.441592653589793, -2.3415926535897933, -2.241592653589793, -2.141592653589793, -2.041592653589793, -1.941592653589793, -1.841592653589793, -1.741592653589793, -1.6415926535897931, -1.541592653589793, -1.441592653589793, -1.341592653589793, -1.241592653589793, -1.1415926535897931, -1.041592653589793, -0.9415926535897929, -0.8415926535897928, -0.7415926535897928, -0.6415926535897931, -0.541592653589793, -0.44159265358979294, -0.34159265358979285, -0.24159265358979276, -0.14159265358979312, -0.04159265358979303, 0.05840734641020706, 0.15840734641020715, 0.25840734641020724, 0.3584073464102069, 0.458407346410207, 0.5584073464102071, 0.6584073464102072, 0.7584073464102072, 0.8584073464102069, 0.9584073464102074, 1.058407346410207, 1.1584073464102067, 1.2584073464102072, 1.3584073464102069, 1.4584073464102074, 1.558407346410207, 1.6584073464102076, 1.7584073464102072, 1.8584073464102069, 1.9584073464102074, 2.058407346410207, 2.1584073464102076, 2.2584073464102072, 2.358407346410207, 2.4584073464102074, 2.558407346410207, 2.6584073464102076, 2.7584073464102072, 2.858407346410207, 2.9584073464102074, 3.058407346410207, 3.058407346410207], "showlegend": true, "mode": "lines", "name": "y1", "zmin": null, "legendgroup": "y1", "zmax": null, "line": {"color": "rgba(0, 154, 250, 1.000)", "shape": "linear", "dash": "solid", "width": 1}, "y": [-1.2246467991473532e-16, -1.2246467991473532e-16, -0.09983341664682836, -0.19866933079506152, -0.29552020666133955, -0.3894183423086505, -0.4794255386042031, -0.5646424733950355, -0.6442176872376912, -0.7173560908995228, -0.7833269096274834, -0.8414709848078966, -0.8912073600614354, -0.9320390859672265, -0.963558185417193, -0.9854497299884603, -0.9974949866040544, -0.9995736030415051, -0.9916648104524686, -0.9738476308781951, -0.9463000876874144, -0.9092974268256816, -0.8632093666488736, -0.80849640381959, -0.7457052121767199, -0.6754631805511506, -0.5984721441039564, -0.515501371821464, -0.42737988023382967, -0.33498815015590455, -0.23924932921398187, -0.1411200080598671, -0.041580662433290366, 0.05837414342758021, 0.15774569414324877, 0.2555411020268318, 0.35078322768961995, 0.4425204432948526, 0.5298361409084935, 0.6118578909427194, 0.6877661591839741, 0.7568024953079283, 0.8182771110644109, 0.8715757724135882, 0.916165936749455, 0.9516020738895161, 0.9775301176650971, 0.9936910036334645, 0.9999232575641009, 0.9961646088358406, 0.9824526126243324, 0.9589242746631385, 0.925814682327732, 0.8834546557201531, 0.8322674422239007, 0.772764487555987, 0.7055403255703918, 0.6312666378723208, 0.5506855425976375, 0.4646021794137565, 0.3738766648302359, 0.27941549819892575, 0.1821625042720949, 0.08308940281749629, 0.08308940281749629], "type": "scatter", "zaxis": null, "z": null}, {"xaxis": "x", "colorbar": {"title": {"text": ""}}, "yaxis": "y", "x": [1.0471975511965976, 1.0471975511965976, 1.0471975511965976], "showlegend": true, "mode": "markers", "name": "y2", "zmin": null, "legendgroup": "y2", "marker": {"symbol": "circle", "color": "rgba(227, 111, 71, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "zmax": null, "y": [0.8660254037844386, 0.8660254037844386, 0.8660254037844386], "type": "scatter", "zaxis": null, "z": null}, {"xaxis": "x", "colorbar": {"title": {"text": ""}}, "yaxis": "y", "x": [-3, -3, -2, -1, 0, 1, 2, 2], "showlegend": true, "mode": "lines", "name": "y3", "zmin": null, "legendgroup": "y3", "zmax": null, "line": {"color": "rgba(62, 164, 78, 1.000)", "shape": "linear", "dash": "solid", "width": 1}, "y": [-1.1575733718138606, -1.1575733718138606, -0.6575733718138606, -0.15757337181386033, 0.34242662818613967, 0.8424266281861398, 1.34242662818614, 1.34242662818614], "type": "scatter", "zaxis": null, "z": null}, {"xaxis": "x", "colorbar": {"title": {"text": ""}}, "yaxis": "y", "x": [0, 0, 0], "showlegend": true, "mode": "markers", "name": "y4", "zmin": null, "legendgroup": "y4", "marker": {"symbol": "circle", "color": "rgba(255, 255, 0, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "zmax": null, "y": [0.34242662818613967, 0.34242662818613967, 0.34242662818613967], "type": "scatter", "zaxis": null, "z": null}], "config": {"showlegend": false, "xaxis": {"showticklabels": true, "gridwidth": 0.5, "range": [-3.141592653589793, 3.058407346410207], "domain": [0.0658209390492855, 0.9934383202099738], "mirror": false, "tickangle": 0, "showline": false, "zeroline": true, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "y", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgba(0, 0, 0, 0)", "type": "linear", "autorange": true}, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "annotations": [{"yanchor": "middle", "xanchor": "right", "rotation": 0, "y": 0.34242662818613967, "font": {"color": "rgba(0, 0, 255, 1.000)", "family": "sans-serif", "size": 11}, "yref": "y", "showarrow": false, "text": "0.342 ", "xref": "x", "x": 0}], "height": 500, "margin": {"l": 0, "b": 20, "r": 0, "t": 20}, "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "yaxis": {"showticklabels": true, "gridwidth": 0.5, "range": [-1.2964622607027496, 1.481315517075029], "domain": [0.03762029746281716, 0.9901574803149606], "mirror": false, "tickangle": 0, "showline": false, "zeroline": true, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "x", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgba(0, 0, 0, 0)", "type": "linear", "autorange": true}, "width": 824.359375}}