














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various methods for solving boundary value problems (BVPs) of ordinary differential equations (ODEs), including the shooting method, finite difference method, and use of MATLAB built-in functions. Topics covered include understanding the difference between initial value problems and boundary value problems, the concept of boundary conditions, and error and stability analysis in numerical solutions.
Typology: Study notes
1 / 54
This page cannot be seen from the preview
Don't miss anything!















































11.1^ Background
^ Example^ of^ BVP^ ^ Modeling^ of^ temperature
ܶ^ :^ temperature^ of^ the^ surrounding௦^
air ܽ^ andܽ^ :^ coefficientsଵ^ ଶ ^ Boundary^ conditions:ܶ^ and^
^ Problem^ statement^ of^
a^ second‐order^ boundary value^ problem
11.1^ Background
^ BVP^ of^ higher^ order^ ODEs^ ^ Require^ additional^ boundary
that^ relates^ the^ deflection^ of^ a^ beam,
ݕ,^ due^ to^ the^ application^ of^ a distributed^ load,^ ሻݔሺ,^ is: Four^ boundary^ conditions^ are^ necessary.
11.2^ The^ Shooting^ Method
^ Shooting^ method^ ^ Boundary^ value^ problem
is^ solved^ again. ^ Repeated^ until^ the^ numerical
solution^ agrees^ with^ the^ BCs.
11.2^ The^ Shooting^ Method
^ Shooting^ method^ for^ a
two‐point^ BVP BVP with a Second‐order^ ODE Step (^1) Step 2: first guess for^ the^ initial^ value Step 3: Second guess
11.2^ The^ Shooting^ Method
^ Estimating^ the^ slope^ at
ܽൌ ݔ Starts by guessing two^ values^ for^ the^ slope^ of^ ሻݔሺݕ
11.2^ The^ Shooting^ Method
^ Example^11 ‐1:^ Temperature
distribution^ in^ a^ pin^ fin.^ Solving
a^ second‐order^ ODE^ (BVP) using^ the^ shooting^ method.
11.2^ The^ Shooting^ Method
^ Example^11 ‐1:^ Temperature
distribution^ in^ a^ pin^ fin.^ Solving
a^ second‐order^ ODE^ (BVP) using^ the^ shooting^ method. % Solving Example 11-1clear alla=0; b=0.1; TINI=473; wINI1=-1000; h=0.001; Tend=293;wINI1=(TINI-Tend)/(a-b);[x, T1, w] = ...Sys2ODEsRK2(@odeChap11Exmp1dTdx,@odeChap11Exmp1dwdx,a,b,h,TINI,wINI1);n=length(x) ;fprintf('The temperature at x=0.1 is %5.3f, for initial value of dt/dx= %4.1f\n',...T1(n) ,wINI1)wINI2=0.5*wINI1;[x, T2, w] = ...Sys2ODEsRK2(@odeChap11Exmp1dTdx,@odeChap11Exmp1dwdx,a,b,h,TINI,wINI2);fprintf('The temperature at x=0.1 is %5.3f, for initial value of dt/dx= %4.1f\n',...T2(n) ,wINI2)plot (x, T1,x,T2);hold on;
11.2^ The^ Shooting^ Method
^ Example^11 ‐1:^ Temperature
distribution^ in^ a^ pin^ fin.^ Solving
a^ second‐order^ ODE^ (BVP) using^ the^ shooting^ method. Told=T1(n);Tnew=T2(n);error=abs(Tend-Tnew);while (error>1.0e-5)wINI3 = wINI1 + (Tend - Told) * (wINI2 - wINI1) / (Tnew - Told);[x, T3, w] =...Sys2ODEsRK2(@odeChap11Exmp1dTdx,@odeChap11Exmp1dwdx,a,b,h,TINI,wINI3);fprintf('The temperature at x=0.1 is %5.3f, for initial value ofdt/dx= %4.1f\n', ...T3(n) ,wINI3)Told=Tnew;Tnew=T3(n);wINI1=wINI2;wINI2=wINI3;error=abs(Tend-Tnew);plot (x, T3);hold on;end
11.2^ The^ Shooting^ Method
^ Shooting^ method^ using
the^ bisection^ method Withܹ ݕܻ (^) ு ,ு Withܹ ݕܻ൏ (^) , At new iteration
11.2^ The^ Shooting^ Method
^ Shooting^ method^ using
the^ bisection^ method % Solving Example 11-1clear alla=0; b=0.1; TINI=473; wH=-1000; h=0.001; Tend=293;[x, T1, w] = ...Sys2ODEsRK2(@odeChap11Exmp1dTdx,@odeChap11Exmp1dwdx,a,b,h,TINI,wH);n=length(x) ;fprintf('The temperature at x=0.1 is %5.3f, for initial value of dt/dx= %4.1f\n',...T1(n) ,wH)wL=-3500;[x, T2, w] = ...Sys2ODEsRK2(@odeChap11Exmp1dTdx,@odeChap11Exmp1dwdx,a,b,h,TINI,wL);fprintf('The temperature at x=0.1 is %5.3f, for initial value of dt/dx= %4.1f\n',...T2(n) ,wL)plot (x, T1,x,T2);hold on;
11.2^ The^ Shooting^ Method
^ Shooting^ method^ using
the^ bisection^ methodThe temperature at x=0.1^ is^ 536.502,^ for^ initial^ value
11.2^ The^ Shooting^ Method
^ Shooting^ method^ using
the^ secant^ method ܧݕ ൌܻെ (^) ିଵ ,ିଵ ܧݕ ൌܻെ (^) , ܧs from the previous two^ iterations^ can be both positive, negative,^ or they can have opposite^ signs ^ Additional^ comments^ ^ BVPs^ with^ derivative,