Question: How to fix a piecewise function that is not behaving as expected.

I have created a simple piecewise function to represent the radius r(x) of a circular cylinder of length 2a and radius b with ellipsoidal end caps of length e << a and e << b to get a smooth transition of r(x) at the two ends for use in slender body theory. The piecewise function does not behave as I had expected, and this is the first time that I have used a piecewise function. What am I doing wrong? The attached (I hope) Maple worksheet shows both my expected behavior and the actual behaviort. Any help will be greatly appreciated. Thanks.

Neill Smith

Piecewise_Cylinder_Geom.mw

 

Please Wait...