kill(all)$

van=facebook.com/LearningCalculus$

M(theta):=matrix
(
    [cos(theta),-sin(theta)],
    [sin(theta), cos(theta)]
);

F(T,theta):=matrix([T],[-10+10*theta+(T-theta)/10+(T-theta)^2]);

M(theta).F(T,theta);

M(0).F(T,0);

M(-%pi/2).F(T,-%pi/2);

solve(X=(-Y+%pi/2)^2+(-Y+%pi/2)/10-5*%pi-10,Y);

curve:M(theta).F(T,theta);

first(first(curve));

first(second(curve));

equations:[first(first(curve)),first(second(curve))];

solve(equations,[theta,T]);

TT1(theta):=(1/2)*(1/cos(theta))*((-sin(theta)+2*theta*cos(theta)-cos(theta)/10)
+
sqrt((sin(theta)-2*theta*cos(theta)+(cos(theta))/10)^2-
4*cos(theta)*(theta^2*cos(theta)+(99/10)*theta*cos(theta)-10*cos(theta))))$
substitute(TT1(theta),T,first(first(curve)))$
radcan(%)$
fullratsimp(%)$
trigsimp(%);

TT2(theta):=(1/2)*(1/cos(theta))*((-sin(theta)+2*theta*cos(theta)-cos(theta)/10)
-
sqrt((sin(theta)-2*theta*cos(theta)+(cos(theta))/10)^2-
4*cos(theta)*(theta^2*cos(theta)+(99/10)*theta*cos(theta)-10*cos(theta))))$
substitute(TT2(theta),T,first(first(curve)))$
radcan(%)$
fullratsimp(%)$
trigsimp(%);