[계산기 사용] 계산 소프트웨어나 계산기를 사용하여, 주어진 간격 크기 h 로 오일러 방법을 써서 초깃값 문제 y′=ty,y(0)=2 의 근삿값 해를 계산하세요. t=1 에서의 해를 h 에 대한 식으로 구하세요.
힌트: 다음은 y′=f(t,y),y(0)=y0 에 대해 오일러 방법을 수행하는 컴퓨터 프로그램을 작성하는 방법을 나타낸 "의사 코드"입니다.
- 함수 f(t,y) 를 만드세요.
- 매개변수 y(0)=y0,t(0)=0, 간격 크기 h, 그리고 전체 단계 수 N 을 정의하세요.
- 반복문을 작성하세요:
반복
k=0부터N 까지
fn=f(t(k),y(k))
y(k+1)=y(k)+h*fn
t(k+1)=t(k)+h
영어 원문 보기
[T] Use computational software or a calculator to compute an approximate
solution to the initial-value problem y′=ty,y(0)=2 using Euler's Method with a given step size h. Find the solution at t=1
in terms of h.
Hint: Here is "pseudo-code" for how to write a computer program to
perform Euler's Method for y′=f(t,y),y(0)=y0:
- Create function f(t,y).
- Define parameters y(0)=y0,t(0)=0, step size h, and total number of steps, N
- Write a for loop:
for
k=0toN
fn=f(t(k),y(k))
y(k+1)=y(k)+h*fn
t(k+1)=t(k)+h
원본 교재에 이 문제의 정답은 실려 있지 않습니다.