hello, i have been trying to plot the maximum range for theta for a projectile motion experiencing linear drag, but i keep getting errors regarding the written code. when trying to transform y[t] to a function yy[t_] rather than the replacement rule there seems to be no wolfram language translation found and when rooting i get a message:$RecursionLimit :Recursiondepthof1024exceeded.
tfinal[theta_]:=[s=NdSolve[{x' ' [t] == b x' [t] , y' ' [t] == -b y' [t] - g, x[0] == 0, y[0] == 0, x'[0] == v Cos [theta], y'[0] == v Sin[theta]}, {x,y}, {t, 0, 10}];
yy[t_] := y[t] /. s[[1]];
xx[t_] := x[t] /. s[[1]];
xfinal[theta_]:=x[tfinal[theta]]
plot[xfinal[theta], {theta,0.01,2.5}