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?

More than 1 year has passed since last update.

定積分 2*x*exp(x)「2023室蘭工業大学 問1」をsympyでやってみた。

Last updated at Posted at 2023-03-01

sympyのグラフがでます。

オリジナル(公式サイト)
問1

[解答例]
https://muroran-it.ac.jp/uploads/sites/6/2023/02/sugakuR5.pdf#page=4

問1

上の問1と同じです。大学入試数学問題集成>テキスト

sympyで

from sympy import *
x=Symbol('x',real=True)
f=2*x*exp(x)
f2=f.subs({x:2})
l=(diff(f).subs({x:2})*(x-2)+f2).expand()
print("#(1)",l)
print("#(2)",integrate(f,x))
xk=solve(l,x)[0]
print("#(3)",integrate(f,(x,0,2))-Rational(1,2)*(2-xk)*f2)
plot(f,l)
plot(f,l,(x,0,2))
#(1) 6*x*exp(2) - 8*exp(2)
#(2) (2*x - 2)*exp(x)
#(3) 2 + 2*exp(2)/3

plotコマンドは、縦横比?異なります。

1png.png

拡大図

2png.png

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?