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?

できませんでした。増減表。f=2x(x2-3x+2)「2024 岩手大学 前期MathJax【4】」をChatGPTとsympyとWolframAlpha でやってみたい。

Last updated at Posted at 2024-06-27

・極小値が、臨界点らしい。

オリジナル

・大学入試数学問題集成 様> 前期農,教育(数学Ⅰ,Ⅱ,A,B選択)学部【4】 テキスト

ChatGPT-3.5先生へ。(1回目)

・回答は英語です。
 はじめから、「日本語で」を追加してもいいです。
・ページのソースを表示です。MathMLです。
 省略しようと思いましたが、大学入試数学問題集成 様 の全文から必要部分の抜粋です。

id="q-0110"></a><span 
class="qnum">【4】</span> 関数</p>
<p class="equation"><math>
<mrow><mi>f</mi><mo>&af;</mo><mo stretchy="false">(</mo><mi>x</mi>
<mo stretchy="false">)</mo><mo>=</mo><mn>2</mn><mo>&it;</mo><mi>x</mi>
<mo>&it;</mo><mo stretchy="false">(</mo><msup><mi>x</mi><mn>2</mn></msup>
<mo>-</mo><mn>3</mn><mo>&it;</mo><mi>x</mi><mo>+</mo><mn>2</mn>
<mo stretchy="false">)</mo></mrow></math></p>
<p class="slevel">について,次の問いに答えよ.</p>
<p class="s1level">(1) 関数<math>
<mspace width=".2em"></mspace><mrow><mi>f</mi><mo>&af;</mo>
<mo stretchy="false">(</mo><mi>x</mi><mo rspace=".2em" stretchy="false">)</mo></mrow>
</math>の極値を求めよ.</p>
<p class="s1level">(2) <math>
<mi>m</mi><mspace width=".2em"></mspace>
</math>を定数とする.曲線<math>
<mspace width=".2em"></mspace><mrow><mi>y</mi><mo>=</mo><mi>f</mi>
<mo>&af;</mo><mo stretchy="false">(</mo><mi>x</mi>
<mo rspace=".2em" stretchy="false">)</mo></mrow>
</math>に点<math>
<mspace width=".2em"></mspace><mrow><mo stretchy="false">(</mo><mn>0</mn>
<mo>,</mo><mi>m</mi><mo rspace=".2em" stretchy="false">)</mo></mrow>
</math>から引くことができる接線の本数を求めよ.
</p>
</div>
</div>

回答省略(英語です)

日本語で
具体的な解答をお願いします。

...
このように、点 (0,m) から曲線 y=f(x) に引くことができる接線の本数は、具体的な
m の値に依存します。一般に、三次方程式の解の数に応じて 1 本または 3 本の接線が存在します。
???

増減表をお願いします。
増減表をMarkdown形式でお願いします。
x (-\infty, 1 - \frac{\sqrt{3}}{3}) (1 - \frac{\sqrt{3}}{3}) (1 - \frac{\sqrt{3}}{3}, 1 + \frac{\sqrt{3}}{3}) (1 + \frac{\sqrt{3}}{3}) (1 + \frac{\sqrt{3}}{3}, \infty)
(f'(x)) + 0 - 0 +
(f(x)) 増加 局所最大値 減少 局所最小値 増加

ChatGPT-3.5先生へ。(2回目)

WolframAlphaの式で

...
この三次方程式の実数解の数が、引ける接線の本数になります。解の数を具体的に求めるためには、数値的な方法を使用することが考えられます。

ChatGPT-3.5先生へ。sympyで

sympyで

・(抜粋)
・print文を、私が追加しています。


import sympy as sp

# Define the variable and function
x = sp.symbols('x')
f = 2 * x * (x**2 - 3 * x + 2)

# Part (1): Find the critical points
f_prime = sp.diff(f, x)
critical_points = sp.solve(f_prime, x)

# Part (2): Find the number of tangents from point (0, m)
m = sp.symbols('m')
tangent_eq = sp.Eq(f, m + f_prime * (x - 0))
tangents_from_point = sp.solve(tangent_eq, x)

critical_points, tangents_from_point

print("#",critical_points)
print("#",tangents_from_point)
# [1 - sqrt(3)/3, sqrt(3)/3 + 1]
# [-(-1/2 - sqrt(3)*I/2)*(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3)/3 + 1/2 - 3/(4*(-1/2 - sqrt(3)*I/2)*(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3)), -(-1/2 + sqrt(3)*I/2)*(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3)/3 + 1/2 - 3/(4*(-1/2 + sqrt(3)*I/2)*(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3)), -(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3)/3 + 1/2 - 3/(4*(27*m/8 + sqrt((27*m/4 - 27/4)**2 - 729/16)/2 - 27/8)**(1/3))]

あきらめました。

WolframAlpha で

・グラフがでます。

いつもの? 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?