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?

複素数平面「(その2/4)【1問多解】2025年 京都大(理系) 複素数の絶対値の最大・最小」様をAI先生に丸投げ。

Last updated at Posted at 2025-04-10

・mathjaxの丸投げです。

(再出)オリジナル

・問題文(mathjax テキスト形式)
 大学入試数学問題集成 様。いつもお世話になっております。
 2025 京都大学 前期MathJax理系【1】問1
 https://mathexamtest.web.fc2.com/2025/202510541/2025105410100mj.html
 https://mathexamtest.web.fc2.com/daigakubetumj/10541index.html#y2025

ChatGPT先生へ

 (省略)

(本日の)Gemini先生へ

質問リスト

# 質問リスト
1.  次の各問に答えよ.
    * 問1 $i$は虚数単位とする.複素数$\,z\,$が,絶対値が$\,2\,$である複素数全体を動くとき,$\left|z-\displaystyle\frac{i}{z}\right|$の最大値と最小値を求めよ.
2.  上記をsympyのソースコードで教えて下さい。結果もテキスト形式で。
3.  以上の私の質問をMarkdown形式でリスト化して出力して。Markdown形式でリストからアスタリスクは削除して。 1行目に、# 質問リスト の文字を出力して。追番をふって下さい。
4.  上の質問リストをmarkdown形式で。本質問も含めて。
5.  markdown形式で。

(回答省略)

・上記をsympy のソースコードで教えて下さい。

from sympy import *

# 変数の定義
theta = symbols('theta', real=True)

# 複素数zの定義
z = 2 * (cos(theta) + I * sin(theta))

# i/zの計算
iz = I / z

# z - i/zの計算
diff = z - iz

# 絶対値の2乗の計算
abs_sq = simplify(abs(diff)**2)

# 三角関数の合成
abs_sq = simplify(abs_sq.subs(cos(theta)**2, 1 - sin(theta)**2))
abs_sq = simplify(abs_sq.subs(sin(theta)*cos(theta), sin(2*theta)/2))

# 最大値と最小値の計算
max_abs_sq = abs_sq.subs(sin(2*theta), -1)
min_abs_sq = abs_sq.subs(sin(2*theta), 1)

# 絶対値の計算
max_abs = sqrt(max_abs_sq)
min_abs = sqrt(min_abs_sq)

# 結果の出力
print("最大値:", max_abs)
print("最小値:", min_abs)

実行結果:

最大値: 5/2
最小値: 3/2

copilot先生へ

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

(テンプレート)

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

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?