수치해석[솔루션]/정익사/박재년/안병도
본 자료는 8페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
해당 자료는 8페이지 까지만 미리보기를 제공합니다.
8페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

수치해석[솔루션]/정익사/박재년/안병도에 대한 보고서 자료입니다.

본문내용

(3,i)
call dots(tn+h,xn,f)
do 50 i=1,n
50 k(4,i)=h*f(i)
do 60 i=1,n
sk=k(1,i)+2*k(2,i)+2*k(3,i)+k(4,i)
60 xn(i)=tx(i)+sk/6
do 70 i=1,n
70 tx(i)=xn(i)
80 tn=tn+h
return
end
subroutine dots(t,x,f)
real x(10),f(10)
f(1)=x(2)
f(2)=x(3)
f(3)=t+2*x(1)+t*f(1)-t*f(2)
return
end
data : 03xypq
0.0 0.6 0.2 .0001
0.0 1.0 0.0
결과
x-value y-value y-deriv p-value p-deriv q-value q-deriv
0.000 0.0000 1.0000 1.0000 0.0000 0.0000 0.0000
0.200 0.2003 1.0053 1.0053 0.0793 0.0793 0.7857
0.400 0.4042 1.0418 1.0418 0.3095 0.3095 1.5013
0.600 0.6210 1.1380 1.1380 0.6733 0.6733 2.1208
8.15
subroutine dots(t,x,f)
real x(10),f(10)
real k,m
f(1)=x(2)
f(2)=16*cos(8*t)-64*x(1)
return
end
결과
t-value x-value x-deriv p-value p-deriv
0.000 0.0000 0.0000 0.0000 16.0000
0.200 0.1999 0.9529 0.9529 -13.2617
0.400 -0.0233 -3.2529 -3.2529 -14.4786
0.600 -0.5977 -0.5762 -0.5762 39.6522
0.800 0.0932 6.4729 6.4729 9.9240
1.000 0.9894 -0.1746 -0.1746 -65.6465
8.17
c simulataneous differential equations
c solving with modified euler method
external fxp,fyp
open(6,file='bnd17.out',status='old')
c (tl,tu): independent variable bounary value
c (xl,xu): dependent variable initial value
c (ch1,ch2):asumed derivertive value
c h interval increment value
c fxp:function subroutine supplid by user dx/dt=y
c fyp:function subroutine supplied by user dy/dt
tl=0
tu=1.
xl=0
xu=1.9
ch1=1.
ch2=1.50
h=0.1
y0=ch1
r=xu
t0=tl
x0=xl
y0=ch1
tol=0.000001
call euler(t0,tu,h,x0,y0,fxp,fyp,r1,tol)
dch=100
drr=100
while(dch.gt.tol.and.drr.gt.tol) do
t0=tl
x0=xl
y0=ch2
call euler(t0,tu,h,x0,y0,fxp,fyp,r2,tol)
ch= ch1+(ch2-ch1)/(r2-r1)*(r-r1)
ch1=ch2
ch2=ch
dch=abs(ch1-ch2)
drr=abs(r1-r2)
r1=r2
endwhile
stop
end
subroutine euler(t0,tl, h,x0,y0,fxp,fyp,xc,tol)
write(*,15)
15 format(9x,'x',9x,'y',9x,'p')
write(*,25)t0,x0,y0
while(t0.le.tl)do
25 format(5x,6f10.4)
t1=t0+h
xdot=fxp(t0,x0,y0)
ydot=fyp(t0,x0,y0)
xp=x0+h*xdot
yp=y0+h*ydot
dx=10.
dy=10.
while(dx.gt.tol.and.dy.gt.tol)do
xc=x0+(xdot+fxp(t1,xp,yp))*h/2.
yc=y0+(ydot+fyp(t1,xp,yp))*h/2.
dx=abs(xc-xp)
dy=abs(yc-yp)
xp=xc
yp=yc
endwhile
t0=t1
x0=xc
y0=yc
write(*,25)t0,x0,y0
endwhile
return
end
function fxp(x,y,p)
fxp=p
return
end
function fyp(x,y,p)
fyp=4.2*x+ 3*y-x*p
return
end
x y y'
0.0000 0.0000 1.0000
0.1000 0.1000 1.0310
0.2000 0.2077 1.1238
0.3000 0.3279 1.2787
0.4000 0.4666 1.4958
0.5000 0.6301 1.7750
0.6000 0.8247 2.1163
0.7000 1.0565 2.5198
0.8000 1.3318 2.9855
0.9000 1.6567 3.5132
1.0000 2.0375 4.1031
x y y'
0.0000 0.0000 1.5000
0.1000 0.1500 1.5360
0.2000 0.3090 1.6437
0.3000 0.4824 1.8236
0.4000 0.6773 2.0757
0.5000 0.9011 2.4000
0.6000 1.1609 2.7964
0.7000 1.4640 3.2650
0.8000 1.8175 3.8057
0.9000 2.2287 4.4186
1.0000 2.7048 5.1036
x y y'
0.0000 0.0000 0.8970
0.1000 0.0897 0.9269
0.2000 0.1869 1.0166
0.3000 0.2960 1.1664
0.4000 0.4232 1.3763
0.5000 0.5743 1.6462
0.6000 0.7554 1.9762
0.7000 0.9725 2.3663
0.8000 1.2317 2.8164
0.9000 1.5388 3.3267
1.0000 1.9000 3.8969
8.18 답: | y
-----------+--------------
0 | 0
/8 | 0.3851
/4 | 0.7108
3 /8 | 0.9268
/2 | 1

키워드

  • 가격3,000
  • 페이지수24페이지
  • 등록일2012.03.13
  • 저작시기2009.04
  • 파일형식한글(hwp)
  • 자료번호#788454
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니