% Script: TestProb8 % Description: Contains test problem for use by Steady % Try alpha = 1, bta = 2, d = pi/4 for this example. % This is Example 5.4 of paper. First execute this file, % then execute "TestSteady". % Problem parameters global G = 0; % flux rhs in BC. global A = 1; % coefficient of c(0) in BC global B = -1; % coefficient of c'(0) in BC global edecay = 0; % exponential decay (0=false) % DEFINE EXACT SOLUTION function retval = csoln(x) % usage: csoln(x) % description: this computes the solution function csoln(x) retval = x^1.5*exp(-x); endfunction % DEFINE THE COEFFICIENTS: function retval = D(x) % usage: D(x) % description: this computes the fcn D(x) % Reminder: If you change this, you must also change Dp retval = 1; endfunction % function retval = Dp(x) % usage: Dp(x) % description: this computes the fcn D'(x) retval = 0; endfunction % function retval = v(x) % usage: v(x) % description: this computes the fcn v(x) % Reminder: If you change this, you must also change vp retval = 1; endfunction % function retval = vp(x) % usage: vp(x) % description: this computes the fcn v'(x) retval = 0; endfunction % function retval = lam(x) % usage: lam(x) % description: this computes the fcn lam(x) retval = 3/(4*x*x); endfunction % function retval = f(x) % usage: f(x) % description: this computes the fcn f(x) retval = exp(-x)*sqrt(x)*(4.5-2*x); endfunction % DEFINE THE WEIGHT FUNCTION function retval = p(x) % REMINDER: p(0) must equal 1 % usage: p(x) % description: this computes the weight fcn p(x) % If you change this, you must also change pp(x) retval = exp(-x); endfunction % function retval = pp(x) % usage: pp(x) % description: this computes the bdy fcn p'(x) retval = -exp(-x); endfunction %