Find Docs

Astronomical Applications Department, U.S. Naval Observatory - Sensitivity Integral (Page 7)

Wodocs >> Science : Astronomy >> Astronomical Applications Department, U.S. Naval Observatory Sensitivity Integral Page 7
Astronomical Applications Department, U.S. Naval Observatory - Sensitivity Integral
To consolidate effort, we now write a procedure that automatically separates out the trig and
polynomial parts of the integrand and performs integration by parts with the polynomial term
chosen as the one that is differentiated. Comments in the procedure body explain what's
happening. This procedure is highly optimized for this particular form of integral.
ugh := proc( expr )

local p, q, H, K, locI, locp, T, remdr;
global parts, _k_;

# update the parts index
if not assigned(_k_) then
_k_ := 0;
else
_k_ := _k_ + 1;
fi;

# grab the integral
if type( expr, function ) and op(0,expr)=Int then
H := expr;
else
H := select( has, expr, Int );
fi;
# get the integrand
K := op(1,H);
# grab the polynomial part and store in p
q := remove( has, %, {sin,cos} );
if type(q,`+`) then #already have it
p := q;
else
for p in q do
if type(p,`+`) then
break;
fi;
od:
fi;
if not has(p,{s,g}) then
locp := location( K, p );
debug_print(procname,`polynomial factor p:`,1,p);
debug_print(procname,`location of p in integrand: `,2,locp);
else
locp := [];
debug_print(procname,`no polynomial factor!`,1);
fi;

# now integrate by parts
debug_print(procname,`integrating by parts...`,0);
if nops(locp) > 0 then
q := intparts( expr, p );
debug_print(procname,`entire integrated mess:`,4,q);
else
debug_print(procname,`entire integrated mess:`,4);
RETURN( value( expr ) );
fi;

# store the evaluated part
parts[_k_] := remove( has, q, Int );
debug_print( procname,
Page 7

<< Previous       1 2 3 4 5 6 7 8 9 10 11 12 13 14 15       Next >>



Other Documents:
3 D plot fits, lyap2, NAO 150, Rotate Vector, lyapcalc, wedges, Scifull, Precession Memo, Precession Maple, Curves 3 D, NOVAS 2004 Overview, NOVAS 2006 Overview, thesis, Ranson,


WODocs | |
All rights reserved. wodocs.com© 2009
WODocs


New Docs

Documents Category:
Arts (Design, Movies, Music, Radio, Television)
Automotive (Cars, Marine, Motorcycle, ATV, Snowmobiles)
Business (Biotechnology and Pharmaceuticals, Chemicals, Construction and Maintenance, Materials, Real Estate, Services)
Electronics (Computers, Motion Control, Power Supply)
Games (Board, Family, Party, Card, Construction, RC Toys)
Health (Animalm, Beauty, Healthcare, Medicine, Pharmacy, Surgery, Weight Loss)
Home (Accessories, Cooking, Decor and Design, Electrical, Family, Pets)
News (Newspapers, Sports, Television)
Recreation (Collecting, Hiking, Scouting, Survival, Travel)
Reference (Education, Libraries and Archives, Museums)
Science (Agriculture, Astronomy, Biology, Chemistry)
Shopping (Antiques and Collectibles, Clothing, Flowers, Food, Home and Garden)
Sports (Bicycle, Snowboard, Skiing, Other)