I am trying to find approximate solution for nonlinear ODE(I know there are are ways to do it in mathematica) but I really want why is not working(I modified the code base on some codes suggest by expert here for system):
ClearAll["Global`*"] eq = {u'[t] == u[t]^2 + 1, u[0] == 0} // Simplify u[t_] = Sum[ t^s, {s, 0, 6}] + O[t]^7; le = LogicalExpand[#] & /@ eq; sol1 = NSolve[And @@ le, Flatten[Table[s, {s, 0, 6}], 1]]; uu1[t_] = Normal[{u[t]} /. First@sol1] // Simplify; uu1[t] // TableForm pl = Plot[Evaluate[{uu1[t]}, {t, 0, 6}], PlotStyle -> {Blue}]; 



NDSolveis used to solve ODEs, notNSolve. You might want to study some examples in its documentation, because I'm not sure how to fix your code. $\endgroup$