Dec 15, 2024 20:12
I see, so you have stored $O(n)$ evaluations for some $x$ values drawn from $[0, 1]$ and try to use that to evaluate another $x$. Then you do not need binary search if those $x$ values are not randomly chosen, if $x$ values are equally spaced, then you can access the nearest one in O(1) time instead of $\log n$.
Dec 15, 2024 20:12
What is your $n$, is it the number of terms? Then the $O(n)$ method is straightforward, why do you need $O(n\log n)$ methods?
 

 Wordle/Quordle/Octordle/Nerdle/Semant

For discussion about today's puzzles (spoilers!). A full list ...
Feb 13, 2024 02:14
nerdlegame 755 3/6

🟩⬛⬛⬛🟪⬛🟪🟪
🟩🟪⬛🟩🟪🟩⬛🟪
🟩🟩🟩🟩🟩🟩🟩🟩
 
Mar 11, 2013 17:54
use mean value
Mar 11, 2013 17:54
f(t_1,y_1) - f(t_1,y(t_1)) = f_y (t_1,\xi)(y_1-y(t_1))
Mar 11, 2013 17:53
yes
Mar 11, 2013 17:53
the error between f(t_1,y_1) and f(t_1,y(t_1)) is a O(h^2) error
Mar 11, 2013 17:52
yes
Mar 11, 2013 17:52
they are different, but with a higher order error.
Mar 11, 2013 17:48
sorry, made a mistake
Mar 11, 2013 17:47
$y_1 = y(t_0) + hf(t_1,y_1)$, $y_0 = y(t_1) - hf(t_1,y(t_1))+ O(h^2)$, and f(t_1,y(t_1)) - f(t_1,y_1) = h f_y + O(h^2)
Mar 11, 2013 17:44
$y_1$ and $y(t_1)$ are different, what we need is the difference should be $O(h^2)$
Mar 11, 2013 17:43
expansion at $t_1$.
Mar 11, 2013 17:43
$y_0 = y_(t_0) = y(t_1-h) = y(t_1) - h f(t_1,y(t_1)) + O(h^2)$
Mar 11, 2013 17:25
$y_1$ is what you numerically got. $y(t_1)$ is the true answer at $t_1$
Mar 11, 2013 17:24
expand your function at $t_1$, $y(t_1-h) = y(t_1) - \cdots$
Mar 11, 2013 17:24
You have to show that $y_0 + hf(t_1,y_1) - y(t_1) = O(h^2)$, and you can get $y(t_0) = y(t_1) - hf(t_1,y_1) + O(h^2)$ by Taylor.
Mar 11, 2013 17:24
you try $y_1(x+h)$, expand at $x$.
Mar 11, 2013 17:24
Just apply the definition of consistency.