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.

放物線補間で極値を求める。

Last updated at Posted at 2022-08-25

(0,y0), (1,y1), (2,y2) を通る放物線を求めて、yが極大となるxを求める。

y = a * x^2 + b * x^1 + c とおく。

y0 = c
y1 = a + b + c
y2 = 4a + 2b + c
y1 - y0 = a + b
y2 - y1 = 3a + b
y2 - 2*y1 + y0 = 2a

a = 0.5 * y0 + 0.5 * y2 - y1
b = y1 - y0 - (0.5 * y0 + 0.5 * y2 - y1) = -1.5 * y0 + 2 * y1 - 0.5 * y2
c = y0

y が極大となる x は -b / (2a) で求められる。

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?