kill(all)$

load(lrats)$

launching :errors,burnout flight path angle :η,by the down-range.,'version 1.0'
peter.vlasschaert@gmail.com,03/07/2018.

see:geometrytrajectoryballisticmissilepart1version1final
=>  find :cos(ψ/2).

p1:cos(ψ/2)=1/sqrt(Δ^2*cos(η)^2-2*Δ*cos(η)^2+1)-(Δ*cos(η)^2)/sqrt(Δ^2*cos(η)^2-2*Δ*cos(η)^2+1);

     =>  Δψ  ~ ∂ψ/∂η*Δη

1e)  find from  ' cotg(ψ/2) '  maxima = cot(ψ/2)

p2:combine(p1);

p3:sin(ψ/2) =sqrt(1-(cos(ψ/2))^2);

a) rem , complex numbers,very difficult

p4:lratsubst([p2],p3);

b) rem , other route

p4a:α1=part(p2,2,1);
p4b:α2=part(p2,2,2);

p4c:lhs(p2)=lhs(p4a)/lhs(p4b);

 use : 'p3'

p4d:lratsubst([p4c],p3);

p4e:cot(ψ/2) =rhs(p4c)/rhs(p4d);

p4f:abs(α2) =α2;

p4g:lratsubst([p4f],p4e);

to remove: (-) sign
================
================
1e)  expand
2e)  combine
================

p4h:lratsubst([p4a,p4b],p4g);

p4i:expand(p4h);

p4j:combine(p4i);

p4k:radcan(p4j);

p4l:sqrt(1-cos(η))*sqrt(cos(η)+1) =sqrt(1-(cos(η))^2);

p4m:lratsubst([p4l],p4k);

p4n:lhs(p4m) = trigsimp(rhs(p4m));

p4o:lratsubst([abs(sin(η))=sin(η)],p4n);

p4o1:expand(p4o);

p4o2:combine(p4o1);

p4p:lhs(p4o) = trigreduce(rhs(p4o2));

p4q:expand(p4p);

rem : definition csc
================

trigsimp(csc(2*η));

depends(ψ,η);

differentiate with respect to 'η'

p5:diff(p4q,η);

p6: lhs(p5)=trigsimp(rhs(p5));

p7:expand(p6);

p8:(cos(2*η))/(sin(2*η)) =cot(2*η);

p9:lratsubst([p8],p7);

p10:expand(p9);

by definition :

p10a:1/sin(η) = csc(η);
p10b:1/sin(2*η) = csc(2*η);

p11:lratsubst([p10a,p10b],p10);

p12:factor(p11);

with use : 'p4q' 
rem :cot(ψ/2)=(2*csc(2*η))/Δ-cot(η)  =>csc(2*η)

p13:solve(p4q,csc(2*η));

p14:p13[1];

csc(2*η) into 'p12'

p15:lratsubst(p13,p12);

p16:solve(p15,'diff(ψ,η,1));

p17:p16[1];

we want to remove :? p15 use ' rhs ' some definitions'

p15a: csc(δ) =1/sin(δ);
p15b:cot(δ) =cos(δ)/sin(δ);

p15c:lratsubst([δ=η],p15a);
p15d:lratsubst([δ=η],p15b);

p18:lhs(p15)=lratsubst([p15c,p15d],rhs(p15));

p19:expand(p18);

p19a:rhs(p19);
p19b:part(p19a,1);
p19c:part(p19a,2);
p19d:part(p19a,3);

part from rhs only dependent  'η'
===========================
===========================

p20:trigexpand(p19c+p19d);

p21:lratsubst([p15d],p20);

p22:trigsimp(p21);

--------------------------------------------------

p23:lhs(p19)=p19b+p22;

We want to solve :'diff(ψ,η,1) from 'p23'

p24:solve(p23,'diff(ψ,η,1));

p25:trigsimp(p24);

by definition:  sin(2*ψ) = 2*cos(ψ)*sin(ψ).

p25a: 2*cos(δ)*sin(δ) =sin(2*δ) ;

p25b:lratsubst([δ=ψ/2],p25a);

p25c:lratsubst([p25b],p25);

remove : (-) sign
1e) expand
2e) combine
3e) factor

p25d:trigreduce(p25c);

p25e:expand(p25d);

p25f:combine(p25e);

p25g:factor(p25f);

--------------------------------------------------------------------------------------------------------------------------------------