I understand you are facing discrepancies in solutions from "dsolve" and "ode45" for zero initial conditions. It appears that the system has faster dynamics compared to the default tolerances in "ode45". You can set the absolute and relative tolerances to smaller values using "odeset" as follows:
>> options = odeset('RelTol', 1e-10, 'AbsTol', 1e-12);
>> [t1,x]=ode45(@pend,[0 5],[0 0],options);
Setting these tolerances to appropriate values get the solutions from the two solvers to match as shown below. Hope this helps.