function dydt = pendulum_nonlinear_deriv ( t, y )

%*****************************************************************************80
%
%% pendulum_nonlinear_deriv(): right hand side of pendulum_nonlinear_ode().
%
%  Discussion:
%
%    Y1 is the angular displacement;
%    Y2 is the angular velocity;
%    L is the length of the pendulum (set to 1 here);
%    G is the gravitational coefficient (set to 9.8 here).
%
%    y1' = y2
%    y2' = - g / l * sin ( y1 )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T, the current time.
%
%    real Y(2,1), the current state values.
%
%  Output:
%
%    real DYDT(2,1), the time derivatives of the current state values.
%
  [ g, l, m, t0, y0, tstop ] = pendulum_nonlinear_parameters ( );

  dydt = zeros ( 2, 1 );
  dydt(1,1) = y(2);
  dydt(2,1) = - ( g / l ) * sin ( y(1) );

  return
end

