% Script: TestProb52
% Description:  Contains test problem for use by Steady
% Try alpha = 1, beta = 1, d = pi/3 for this problem
% A better alternate: alpha = 1, beta = 0.6, d = pi/2.5
% The alternate conformal to ln works very poorly here.
% This is Example 5.2 of paper.  First execute this file,
% then execute "TestSteady".

% Problem parameters
global G = 1.5; % flux rhs in BC.
global A = 1; % coefficient of c(0) in BC
global B = -0.5; % coefficient of c'(0) in BC
global edecay = 1; % exponential decay (0=false)

% DEFINE EXACT SOLUTION

function retval = csoln(x)
% usage: csoln(x)
% description: this computes the solution function csoln(x)

retval = (1+x^2)*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 - exp(-2*x)/2;

endfunction

%

function retval = Dp(x)
% usage: Dp(x)
% description: this computes the fcn D'(x)

retval =  exp(-2*x);

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 = 1;

endfunction

%

function retval = f(x)
% usage: f(x)
% description: this computes the fcn f(x)

% computer generated by Maple
t1 = exp(-3.0*x);
t3 = x*x;
t5 = exp(-x);
retval = -4.0*x*t1+5.0/2.0*t1+3.0/2.0*t3*t1-3.0*t5+6.0*x*t5-t5*t3;

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

%


















