0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

物理数学教科書ガイドp255(2024年3月版)「連立微分方程式をsympyのソースコードと結果を教えて下さい。」をAI先生に聞きました。

Last updated at Posted at 2024-12-27

・タイトル名変更予定です。
・私は内容を理解できていません。
・本ガイドの目次作成予定。
 しばらく?上記の 物理数学教科書ガイド のタグでお願いします。

数学—物理を学び楽しむために—暫定版(2024年3月) 様

PDF=p255(=241+14) (スクショ貼り付けの省略。以下別々に実行しています。)
(本行省略)スクショ貼り付け。実行。
上記の連立微分方程式をsympyのソースコードと結果を教えて下さい。
上記の式をmathjaxのコードで教えて下さい。

???mathjaxh表示の4通りうちの align環境を使う方法で。

\begin{align}
\dot{x}(t) &= -\gamma x(t) + \beta y(t) \\
\dot{y}(t) &= -\gamma y(t) + \beta x(t)
\end{align}

以下のページへの直接のリンクはしていません。
>ファイルのダウンロード 通常版(12 ポイント) (pdf 8.4 MB)
https://www.gakushuin.ac.jp/~881791/mathbook/

sympy実行サイト

・sympyの開発環境は、ページ後半です。

ChatGPT先生へ

Gemini先生へ

(回答抜粋)

from sympy import symbols, Function, dsolve, Eq

# 変数と関数を定義
t, beta, gamma = symbols('t beta gamma', real=True)
x = Function('x')(t)
y = Function('y')(t)

# 微分方程式を定義
eq1 = Eq(x.diff(t), -gamma * x + beta * y)
eq2 = Eq(y.diff(t), -gamma * y + beta * x)

# 連立微分方程式を解く
sol = dsolve([eq1, eq2], [x, y])

# 解を表示
print(sol)
これは
x(t) = C1*exp(t*(-γ - β)) + C2*exp(t*(-γ + β))
y(t) = -C1*exp(t*(-γ - β)) + C2*exp(t*(-γ + β))
という解を表していますここでC1とC2は積分定数です

初期条件の追加...

つづく。

copilot先生へ

wolframalpha先生へ

勉強中

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)  開発環境

いつもと違うおすすめです。

sympyのDoc

・連立方程式を探しています。申し訳ありません。

wikipedia

 ??? Simultaneous differential equation

Qiita

>この記事は最終更新日から5年以上が経過しています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?