Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / contrib / fresnel / ft1.mac
blobb7cd8850410ff0b9a7ed6a94fad9b768f828f05d
1 HannWindow:(1 - cos(2 * %pi * (t*SweepTime)))/2;
2 signal:cos(2*%pi*f0*t*(1+t*(deviation/SweepTime)));
3 delayedSignal:cos(2 * %pi * f0 * (t - delay) * (((deviation * (t - delay))/sweeptime) + 1));
4 p:expand(
5   subst([f0=40*10^3,SweepTime=20*10^(-3),deviation=1/10,delay=80],
6     trigreduce(expand(demoivre(
7       exp(%i*2*%pi*f*t)*HannWindow*signal*delayedSignal)))));
8 ip:map(lambda([x],'integrate(x,t)),p);
9 matchdeclare(a,NON_ZERO_AND_FREEOF(t));
10 matchdeclare([b,c],freeof(t));
11 defrule(c1,'integrate(cos(t *b +a* t^2 +c),t),
12    sqrt(%pi/(2*a))*(cos((b^2-a*c)/a)*cfresnel(sqrt(2/(a*%pi))*(a*t+b))
13                    +sin((b^2-a*c)/a)*sfresnel(sqrt(2/(a*%pi))*(a*t+b))));
14 defrule(s1,'integrate(sin(t *b +a* t^2 +c),t),
15    sqrt(%pi/(2*a))*(cos((b^2-a*c)/a)*sfresnel(sqrt(2/(a*%pi))*(a*t+b))
16                    -sin((b^2-a*c)/a)*cfresnel(sqrt(2/(a*%pi))*(a*t+b))));
17 ip:apply1(ip,c1,s1);
18 ip:apply_nouns(ip);
19 matchdeclare(mv,true);
20 defrule(fgc,cfresnel(mv),(1/2+fresnelF(mv)*sin((%pi/2)*mv^2)-fresnelG(mv)*cos((%pi/2)*mv^2)));
21 defrule(fgs,sfresnel(mv),(1/2-fresnelF(mv)*cos((%pi/2)*mv^2)-fresnelG(mv)*sin((%pi/2)*mv^2)));
22 ip:apply1(ip,fgc,fgs);
23 ip:rncombine(trigreduce(expand(ip)));
24 /* not clear what the following might be.
25 32000000 2.6318905168824d-9 - 1.43108843990402d-12 * %i;
26 1599999999/50 2.63187132363986d-9 - 6.40868894146518d-12 * %i;
27 1600000001/50 3.54691457600174d-12 * %i + 2.63189644230894d-9;
28  */
30 scanmap(dfloat,apply1(expand(dfloat(taylor(d1,f,(1599999999/50),0))),fa,ga));
31 scanmap(dfloat,apply1(expand(dfloat(taylor(d1,f,(1600000001/50),0))),fa,ga));