Use a data connection to take the first and second derivative. Start
<script language="JavaScript"> } </script>