%Braked car   % Feb 10, 2021 
syms m g h d w L mu theta   real
syms N_R  N_F  F_F          real

i  = [1 0 0]';     j = [0 1 0]';    k = [0 0 1]';
c  = cos(theta);   s = sin(theta);

lambda =  c*i +  s*j;
n      = -s*i  + c*j;

w   = L-d; 

r_GR = -d*lambda  - h*n; 
r_GF =  w*lambda  - h*n;

sum_of_forces   = -m*g*j + N_R*n + N_F*n + F_F*lambda;

sum_of_momentsG =   cross(r_GF, (F_F*lambda + N_F*n))...
                  + cross(r_GR, (N_R*n));

eqn1 = dot(sum_of_forces,n);
eqn2 = dot(sum_of_forces,i);
eqn3 = dot(sum_of_momentsG,k);

[N_R, F_F, N_F] = solve([eqn1, eqn2, eqn3],[N_R, F_F, N_F]);

N_R = simplify(N_R);  F_F = simplify(F_F);  N_F = simplify(N_F);

mu = simplify(F_F/N_F);   pretty(mu)

