Processing math: 100%

 

 

 

728x90
,

Mathematica에서 shooting method를 이용해서 비선형 미분방정식의 해를 구하자. 

f=1x(1a)fa=x2f2(f21)

경계조건은 f(0)=0, f()0, a(0)=0을 만족시켜야 한다. x가 증가하면 f(x)는 빠르게 1로 수렴하므로 오른쪽 경계조건은 f(15)1로 잡아도 충분하다. x=0에서의 apparent singularity를 Mathematica가 처리할 수 있도록 방정식을 변형시켜주어야 한다.

 

 

 

728x90
,

In relaxation methods ODEs are replaced by approximate finite difference equations (FDEs) on a grid or mesh of points that spans the domain of interest.

 

알고리즘 및 사용 예제 관련문서들:

NumericalRecipiesInC/c17-3.pdf

NumericalRecipiesInC/c17-4.pdf

 

Numerical Recipes 에서 얻을 수 있는 필요한 코드들:

1) solvde() : main routine; 

2) bksub ()  : supplementary routine

3) pinvs ()  : supplementary routine

4) red ()  : supplementary routine

5) difeq ()  : user supplied  routine in which differential equations, boundary conditions, and their jacobians are defined. called by solvde().

 

주의점: 경계조건 설정에서 주의해야 한다;

728x90
,