Breadcrumbs

 

 

 

Download ModelDownload SourceembedLaunch Website ES WebEJS

About

Description

Explicit second order differential equation

The simulation calculates solutions of ordinary explicit second order differential equations.

y´ ´= d 2y/ dx = f( y, y´, x)

using the Runge−Kutta algorithm. In the left coordinate system the abscissa represents x, the ordinate y.

When opening the file you see a fat red point at x = 0, representing the initial value y0 at its abscissa x0 . You can change the initial value with the slider, more exactly and unlimited by typing a value into the number field. Two additional number fields are used to define x0 and xmax . Default values are: y0 = 1; x0 = 0; xmax = 3. You can also draw the red point to create new initial conditions of y.

With a second slider you can define the initial value for the first derivative. It corresponds to the gradient at the initial ordinate, which is symbolized by an arrow.

In the ComboBox you can chose between a number of predefined types of functions. Their formula is shown in field y´´ = ... There you can edit formulas or input any arbitrary first order explicit differential equation.

Activating start for the default equation, the differential equation of the exponential function y´´= y is evaluated. Calculation stops as x = xmax . At first you see a set of calculated points. You can choose the option trace to see an interpolated curve.

Stop stops the calculation; back leaves already calculated points and sets back to the initial conditions. Changing these now creates an additional curve at start. This way you can create sets of solutions for different initial conditions (the trace option would create jumps, which are avoided in the points option). Clear resets and clears traces, but leaves parameters unchanged. Reset leads back to default values..

After back you can change the x-resolution of calculation by slider step, and look how different resolutions influence the result.

The smaller window shows the phase space projections

y ´ = y ´( y )

y´´  = y´´ ( y )

The thick points are the last ones calculated.

The phase space diagrams very distinctively demonstrate the different character of solutions:  convergence, divergence, periodic oscillation, oscillating divergence, oscillating convergence. It is independent of the initial condition.

Calculus

Numerical integration of differential equations with EJS

Using EJS it is very easy to solve differential equations. Several algorithms for different methods are programmed and can be chosen at page Evolution with a mouse click. The steps of the variable x are automatically calculated, when the difference dx has been defined.

Differential equations of order n are separated into n coupled first order differential equations by substitution, and are calculated accordingly. For a 2nd order equation this leads to

y´´ = f( y, y´, x) ➔ y´ = dy/dx and y´´ = f( y, y´, x)

In this simulation with a ComboBox the formula is:

y´´ = (formula in field y´´, evaluated for x, y and )

In February 2011 EJS 4.3 presents the following methods : 

  • Euler
  • Euler−Richardson
  • Velocity Verlet
  • Runge−Kutta, 4- steps
  • Bogacki−Shampine 3(2)
  • Cah−Karp 5(4)
  • Fehlberg 8(7)
  • Dormand−Prince 5(4)
  • Dormand−Prince 8(5
  • Radau 5(4)
  • OSS3
Experiments

In all experiments study the phase space diagrams too!

E 1: Run cosine and try the points and the trace option.

What do the phase space projections mean?

Try different step widths.

E 2: Go back, and chose new initial conditions. Start creates the solution, which is different from the first one.

Try points an trace option.

E 3:  Create a set of solutions with identical initial value for y and different ones for y´. What is the result of different for the sine function?

E 4:  Create a set of solutions with identical y0 and different x0. Why do you see curves that are shifted parallel?

E 5:  Create a set of curves with different initial values for y and y´, including negative ones. Interpret the results by analyzing the differential equation..

E 6: First choose Exponential, then Exponential Damping. Observe the phase space diagrams. What is the difference? Change initial values and compare again.

E 7:  Choose hyperbolic sine with default initial values y = 1 y´= 1.

Now choose hyperbolic cosine with default initial values y = 1 y´= 0.

Analyze the phase space diagrams.

Remarks:  For the normal exponential the gradient at x = 0 is equal to the initial value of y and cannot be zero for a meaningful exponential. Gradient zero for finite y is characteristic for the hyperbolic cosine (e x + e- x)/2, gradients > 0 with initial y = 0 for the hyperbolic sine (e x- e- x)/2. Imagine both functions mirrored at the zero-ordinate for completeness.

E 8: Choose slowing oscillation and study how the dependence on x influences the periods. Edit the formula such that frequency increases and slowing decreases.

E 9: Choose increasing oscillation and edit formulas correspondingly. Compare the effect of proportional and of reciprocal dependencies on x. Try nonlinear dependencies.

E 10: Choose damped oscillation. Check if periods are constant (when clicking at a point its coordinates are shown in the lower left corner).

E 11:  Choose increasing oscillation and compare the results to those of damped oscillation. Superimpose both curves and check if periods are equal.

E 12: Draw conclusions as to which consequences different terms in the differential equation have. With that in mind, construct differential equations that will show specific characteristics.

Authors

this file was created by Dieter Roess in March 2009

This simulation is part of

Learning and Teaching Mathematics using Simulations

– Plus 2000 Examples from Physics”

ISBN 978-3-11-025005-3, Walter de Gruyter GmbH & Co. KG

 

Translations

Code Language Translator Run

Credits

Dieter Roess - WEH- Foundation; Tan Wei Chiong; Loo Kang Wee

1. Overview:

This document reviews the main features and pedagogical aims of the "Explicit Second Order Differential Equations JavaScript Simulation Applet HTML5" developed by Open Educational Resources / Open Source Physics @ Singapore. This interactive simulation is designed as an open educational resource for learning and teaching mathematics and physics, specifically focusing on the solutions of explicit second-order ordinary differential equations. The applet utilizes the Runge-Kutta algorithm for numerical calculations and provides a visual and interactive environment for exploring the behavior of these equations under varying initial conditions and function definitions.

2. Main Themes and Important Ideas/Facts:

  • Simulation of Second Order Differential Equations: The core functionality of the applet is to calculate and visualize solutions to explicit second-order ordinary differential equations of the form: y´ ´= d^2 y/ dx^2 = f( y, y´, x).
  • Runge-Kutta Algorithm: The simulation employs the Runge-Kutta algorithm, a widely used numerical method, to approximate the solutions of these differential equations. The documentation explicitly mentions this algorithm: "The simulation calculates solutions of ordinary explicit second order differential equations... using the Runge−Kutta algorithm."
  • Interactive Control of Initial Conditions: Users can dynamically adjust the initial value of the function (y0) and its first derivative (y´) at the initial point (x0). This is achieved through sliders, number input fields, and even by directly "drawing" the initial point on the graph: "You can change the initial value with the slider... You can also draw the red point to create new initial conditions of y." The first derivative's initial value is controlled by a separate slider and is visualized as an arrow representing the gradient.
  • Predefined and Custom Functions: The applet offers a ComboBox with a selection of predefined functions (e.g., cosine, exponential, hyperbolic sine). Importantly, users can also edit these formulas or input "any arbitrary first order explicit differential equation" in the y´´ = field, allowing for flexible exploration.
  • Visualization of Solutions: The simulation presents the solution graphically in a coordinate system where the abscissa represents x and the ordinate represents y. Users can choose to view the calculated points or an interpolated curve using the "points" and "trace" options.
  • Exploration of Solution Sets: The applet allows users to calculate multiple solution curves by going "back" to the initial conditions, changing them, and then pressing "start" again. This facilitates the study of how different initial conditions affect the solution: "Changing these now creates an additional curve at start. This way you can create sets of solutions for different initial conditions..."
  • Phase Space Projections: A smaller window displays phase space projections, specifically y ´ = y ´( y ) and y´´ = y´´ ( y ). These diagrams are highlighted as being particularly useful for understanding the qualitative nature of the solutions: "The phase space diagramsvery distinctively demonstrate the different character of solutions: convergence, divergence, periodic oscillation, oscillating divergence, oscillating convergence. It is independent of the initial condition."
  • Numerical Integration with EJS: The documentation notes that the simulation is built using Easy JavaScript Simulations (EJS), a tool that simplifies the process of solving differential equations numerically. It mentions that "several algorithms for different methods are programmed and can be chosen at page Evolution with a mouse click." (While the excerpt doesn't detail these other algorithms, it highlights the flexibility offered by EJS).
  • Conversion to Coupled First-Order Equations: The text explains the underlying mathematical approach: "Differential equations of order n are separated into n coupled first order differential equations by substitution, and are calculated accordingly. For a 2nd order equation this leads to y´´ = f( y, y´, x) ➔ y´ = dy/dx and y´´ = f( y, y´, x)".
  • Variety of Numerical Methods: While the default uses Runge-Kutta, the text mentions that EJS 4.3 (as of February 2011) provides a list of alternative numerical methods including Euler, Euler-Richardson, Velocity Verlet, and several other advanced Runge-Kutta variants.
  • Guided Experiments: The "Experiments" section provides a structured way for users to explore different aspects of second-order differential equations by suggesting specific functions and manipulations of initial conditions. These experiments encourage observation of both the standard solution curves and the phase space diagrams. Examples include studying cosine functions (E1), the effect of different initial for the sine function (E3), parallel shifts with different x0 (E4), and comparing exponential and exponentially damped oscillations (E6).
  • Emphasis on Phase Space Interpretation: The experiments repeatedly prompt users to "study the phase space diagrams too!" highlighting their importance in understanding the qualitative behavior of the solutions.
  • Teacher Utility: The "For Teachers" section explicitly states that the simulation displays graphs for first and second-order differential equations based on the selected function. It also clarifies the visual representations of y, , and y´´.
  • Open Educational Resource: The website title and licensing information indicate that this is an open educational resource, licensed under the Creative Commons Attribution-Share Alike 4.0 Singapore License.

3. Key Quotes:

  • "The simulation calculates solutions of ordinary explicit second order differential equations. y´ ´= d 2 y/ dx = f( y, y´, x) using the Runge−Kutta algorithm." (Description)
  • "You can change the initial value with the slider, more exactly and unlimited by typing a value into the number field... You can also draw the red point to create new initial conditions of y." (About)
  • "In the ComboBox you can chose between a number of predefined types of functions. Their formula is shown in field y´´ = ... There you can edit formulas or input any arbitrary first order explicit differential equation." (About)
  • "The smaller window shows the phase space projections y ´ = y ´( y ) y´´ = y´´ ( y ). The thick points are the last ones calculated. The phase space diagramsvery distinctively demonstrate the different character of solutions: convergence, divergence, periodic oscillation, oscillating divergence, oscillating convergence. It is independent of the initial condition." (About)
  • "Using EJS it is very easy to solve differential equations. Several algorithms for different methods are programmed and can be chosen at page Evolution with a mouse click." (Calculus)
  • "In all experiments study the phase space diagrams too!" (Experiments)
  • "This simulation displays the graphs for a first-order and second-order differential equation, determined by the function selected in the combo box. The graph on the left shows the original curve y = f(x) . The graph on the right shows the graph of y' against y (in blue) and the graph of y'' against y (in red)." (For Teachers)

4. Conclusion:

The "Explicit Second Order Differential Equations JavaScript Simulation Applet HTML5" is a valuable interactive tool for students and educators in mathematics and physics. Its user-friendly interface, combined with the ability to manipulate initial conditions, explore predefined and custom functions, visualize solutions, and analyze phase space diagrams, provides a powerful platform for understanding the behavior of second-order ordinary differential equations. The inclusion of guided experiments further enhances its pedagogical value, encouraging active learning and deeper conceptual understanding. The use of the Runge-Kutta algorithm and the availability of other numerical methods through the underlying EJS framework offer a robust and flexible simulation environment. As an open educational resource, it provides accessible learning opportunities for a wide range of users.

Study Guide: Explicit Second Order Differential Equations JavaScript Simulation Applet

Key Concepts

  • Explicit Second Order Differential Equation: An equation where the second derivative of a function y with respect to x (y´´) is explicitly expressed as a function of x, the function y, and its first derivative : y´´ = f(y, y´, x).
  • Initial Value: The value of the function y at a specific starting point x₀ (often denoted as y₀). In this simulation, it's represented by the initial position of the red point.
  • Initial Derivative: The value of the first derivative at the initial point x₀. Geometrically, this represents the slope (gradient) of the solution curve at the starting point and is visualized by an arrow in the simulation.
  • Numerical Integration: Approximating the solution of a differential equation using numerical methods, as analytical solutions are not always feasible. The simulation uses the Runge-Kutta algorithm for this purpose.
  • Runge-Kutta Algorithm: A family of iterative methods used in temporal discretization for the approximate solutions of ordinary differential equations. The simulation employs this algorithm for calculating the solutions.
  • Phase Space: A graphical representation where the state of a dynamical system is plotted. In this simulation, two phase space projections are shown: vs. y and y´´ vs. y. These diagrams help visualize the qualitative behavior of the solutions.
  • Convergence: In the context of phase space, solutions tend towards a specific point or region as x increases.
  • Divergence: In the context of phase space, solutions move away from a specific point or region as x increases.
  • Periodic Oscillation: In the context of phase space, solutions follow a closed loop, indicating repetitive behavior.
  • Oscillating Divergence: In the context of phase space, solutions exhibit oscillatory behavior while moving away from a central point or region.
  • Oscillating Convergence: In the context of phase space, solutions exhibit oscillatory behavior while moving towards a central point or region.
  • EJS (Easy JavaScript Simulations): An authoring tool used to create interactive simulations, including the one described in the source. It provides pre-programmed algorithms for solving differential equations.
  • Coupled First Order Differential Equations: A system of first-order differential equations that are related to each other. A second-order differential equation can be transformed into two coupled first-order equations by substitution.
  • Substitution: A mathematical technique used to simplify equations. In this context, y´ = dy/dx is substituted to convert a second-order equation into two first-order equations.
  • Step Width (dx): The increment in the independent variable x used in the numerical integration process. Smaller step widths generally lead to more accurate solutions but require more computation.
  • Trace: An option in the simulation to display the calculated points as a continuous interpolated curve.
  • Points: An option in the simulation to display only the discrete calculated points.

Quiz

  1. What type of differential equation does this JavaScript simulation applet calculate solutions for? Briefly describe the general form of such an equation.
  2. Explain the significance of the "initial value" and the "initial derivative" in the context of solving a second-order differential equation. How are these represented in the simulation's interface?
  3. What numerical algorithm is used by the simulation to approximate the solutions of the differential equations? Why is numerical integration often necessary for solving these types of equations?
  4. Describe the purpose of the phase space projections displayed in the smaller window of the simulation. What kinds of solution behaviors can be identified by observing these diagrams?
  5. Explain how a second-order differential equation is handled numerically by EJS, as mentioned in the "Calculus" section. What is the role of substitution in this process?
  6. List three of the numerical methods for solving differential equations that are available in EJS 4.3, according to the provided text.
  7. What is the difference between the "points" and "trace" options in the simulation when displaying the calculated solutions? Under what circumstances might one be preferred over the other?
  8. Explain the function of the "back" button in the simulation. How can it be used to explore multiple solutions for the same differential equation?
  9. According to experiment E4, why do solutions with identical initial y₀ but different x₀ appear as parallel shifted curves for certain differential equations?
  10. What do the sample learning goals and the "For Teachers" section suggest about the educational purpose and utility of this simulation applet?

Quiz Answer Key

  1. The simulation calculates solutions of ordinary explicit second order differential equations. The general form is y´´ = d²y/dx² = f(y, y´, x), where the second derivative is explicitly expressed as a function of x, y, and y´.
  2. The initial value (y₀ at x₀) and the initial derivative (y´ at x₀) are necessary to find a unique solution to a second-order differential equation. In the simulation, y₀ is set by the initial red point's position and the first derivative (slope) is defined by an arrow.
  3. The simulation uses the Runge-Kutta algorithm for numerical integration. Numerical integration is often necessary because analytical solutions (exact mathematical formulas) are not always possible to find for many second-order differential equations.
  4. Phase space projections ( vs. y and y´´ vs. y) visually represent the relationship between the function and its derivatives, illustrating the qualitative behavior of solutions such as convergence, divergence, periodic oscillation, oscillating divergence, and oscillating convergence.
  5. EJS handles second-order differential equations by separating them into two coupled first-order differential equations using substitution. For y´´ = f(y, y´, x), the substitution y´ = dy/dx leads to a system of two first-order equations that can be solved numerically.
  6. Three numerical methods available in EJS 4.3 mentioned in the text are Euler, Runge-Kutta (4-steps), and Euler-Richardson.
  7. The "points" option displays the discrete calculated points of the solution, while the "trace" option connects these points with an interpolated curve. The "points" option is useful for seeing the raw calculated data, while "trace" provides a smoother visual representation of the solution.
  8. The "back" button stops the current calculation, leaves the already calculated points, and resets the simulation to the initial conditions. This allows users to change the initial conditions and generate additional solution curves for comparison.
  9. Solutions with identical initial y₀ but different x₀ appear as parallel shifted curves when the differential equation is autonomous (not explicitly dependent on x). Changing x₀ then simply shifts the solution horizontally in the x-y plane.
  10. The sample learning goals and "For Teachers" section suggest that the simulation is an educational tool for visualizing and understanding the behavior of solutions to second-order differential equations and the influence of initial conditions and different equation forms.

Essay Format Questions

  1. Discuss the role of initial conditions in determining the unique solution of a second-order differential equation. Using examples from the simulation (E2, E3, E4, E5), explain how varying these conditions affects the resulting solution curves and their representation in phase space.
  2. Explain the concept of phase space and its utility in analyzing the qualitative behavior of solutions to second-order differential equations. Describe the different types of behaviors (convergence, divergence, oscillation) as visualized in the phase space diagrams of the simulation, referencing specific experiments (E6, E7, E8, E9, E10, E11).
  3. Compare and contrast the "points" and "trace" options for displaying solutions in the simulation. Discuss the advantages and disadvantages of each method for different learning objectives and how they contribute to understanding the nature of numerical solutions to differential equations.
  4. Based on the experiments (E6, E8, E9, E12), analyze how different forms of the function f(y, y´, x) in the second-order differential equation y´´ = f(y, y´, x) lead to distinct characteristics in the solution curves and their phase space representations. Consider specific examples like exponential growth/decay and oscillations.
  5. Evaluate the educational value of this interactive JavaScript simulation applet for learning about explicit second-order differential equations. Discuss how the interactive features, such as sliders, combo boxes, and the ability to manipulate initial conditions and equation forms, can enhance student understanding of key concepts and solution behaviors.

Glossary of Key Terms

  • Abscissa: The horizontal coordinate (x-coordinate) in a Cartesian coordinate system.
  • Ordinate: The vertical coordinate (y-coordinate) in a Cartesian coordinate system.
  • Derivative: A measure of how a function changes with respect to its independent variable. The first derivative (y´) represents the rate of change, and the second derivative (y´´) represents the rate of change of the rate of change (acceleration).
  • Gradient: The slope of a line or the rate of change of a function. In this context, the initial derivative corresponds to the gradient of the solution at the initial point.
  • Interpolation: A method of estimating values between known data points. The "trace" option in the simulation likely uses interpolation to create a smooth curve between the calculated points.
  • Algorithm: A well-defined sequence of steps for solving a problem or performing a computation. The Runge-Kutta algorithm is a specific example used for numerical integration.
  • Dynamical System: A system whose state evolves over time according to fixed rules. Differential equations are often used to model dynamical systems.
  • Autonomous Equation: A differential equation where the independent variable (x in this case) does not explicitly appear in the function f. The form is y´´ = f(y, y´).
  • Nonlinear Dependence: A relationship between variables that is not directly proportional. Experiment E9 encourages exploring nonlinear dependencies in the differential equation's formula.

 

Sample Learning Goals

[text]

For Teachers

This simulation displays the graphs for a first-order and second-order differential equation, determined by the function selected in the combo box.

The graph on the left shows the original curve y = f(x). The graph on the right shows the graph of y' against y (in blue) and the graph of y'' against y (in red).

The graphs can be viewed either as a set of points or as a continuous trace, by selecting the respective option on the top of the simulation. Press the reset button to reset the simulation, and the play button to play it (this may be intuitive for most users, but I find that this instruction is occasionally useful.)

 

Research

[text]

Video

[text]

 Version:

  1. http://weelookang.blogspot.com/2018/03/explicit-second-order-differential.html

Other Resources

[text]

Frequently Asked Questions: Explicit Second Order Differential Equations Simulation

1. What is the purpose of this JavaScript simulation?

This simulation is designed to calculate and visualize solutions to explicit second-order ordinary differential equations of the form y´´ = f(y, y´, x). It allows users to explore how different parameters and initial conditions affect the behavior of these equations.

2. How does the simulation calculate the solutions?

The simulation employs the Runge-Kutta algorithm to numerically integrate the second-order differential equation. It breaks down the second-order equation into a system of two coupled first-order differential equations, which are then solved step-by-step based on a defined step size (x-resolution).

3. What parameters can I control in the simulation?

Users can manipulate several key parameters:

  • Initial value of y (y0): This sets the starting y-coordinate at the initial x-value (x0). It can be adjusted using a slider or by typing a value. You can also graphically set the initial y-value by dragging the red point.
  • Initial value of the first derivative (y´): This defines the initial slope of the solution curve at x0, visualized by an arrow. It can be changed using a slider.
  • Initial x-value (x0): The starting point on the x-axis for the calculation.
  • Maximum x-value (xmax): The point at which the calculation stops.
  • Function y´´ = f(y, y´, x): Users can select from predefined functions in the ComboBox or input and edit their own arbitrary explicit second-order differential equations.
  • x-resolution (step): This slider controls the step size (dx) used in the numerical integration, influencing the density of calculated points and potentially the accuracy of the solution.

4. How can I visualize the solutions generated by the simulation?

The simulation provides two main visualization areas:

  • Left Coordinate System (x vs. y): This graph displays the solution curve of the differential equation, with the x-axis representing the independent variable and the y-axis representing the dependent variable. You can view the solution as a set of discrete calculated points or as an interpolated continuous trace.
  • Smaller Window (Phase Space Projections): This window shows phase space diagrams, plotting y´ against y (in blue) and y´´ against y (in red). These diagrams are valuable for understanding the qualitative behavior of the solutions, such as convergence, divergence, periodic oscillation, etc., independent of the specific initial conditions.

5. What are the functions of the "start," "stop," "back," "clear," and "reset" buttons?

  • Start: Initiates the calculation of the solution based on the current parameters and initial conditions.
  • Stop: Halts the ongoing calculation.
  • Back: Retains the already calculated points and returns the simulation to the initial conditions, allowing you to change parameters and generate additional solution curves for comparison.
  • Clear: Resets the visualizations by removing any traces or calculated points but leaves the current parameter settings unchanged.
  • Reset: Returns all parameters and initial conditions to their default values.

6. How can I explore the effect of different initial conditions on the solutions?

The simulation allows for easy modification of initial conditions:

  • You can use the sliders or number fields to change the initial values of y (y0) and its first derivative (y´).
  • The "back" button is crucial for generating multiple solutions with different initial conditions without erasing previously calculated curves. By repeatedly using "back," changing initial conditions, and clicking "start," you can create a family of solutions.

7. What is the significance of the phase space diagrams?

The phase space diagrams (y´ vs. y and y´´ vs. y) offer insights into the qualitative nature of the solutions to the differential equation. They can visually demonstrate whether solutions tend to converge to a specific state, diverge away, oscillate periodically, or exhibit combinations of these behaviors. Notably, the general character of these phase space trajectories is often independent of the specific initial conditions.

8. What are some of the suggested experiments I can perform with this simulation?

The "Experiments" section provides several guided explorations, such as:

  • Observing the phase space projections for different predefined functions (e.g., cosine, exponential, hyperbolic sine/cosine).
  • Investigating the impact of varying the step width (x-resolution) on the solution.
  • Creating sets of solutions by systematically changing initial values for y and y´, and observing the resulting curves and phase space diagrams.
  • Comparing the behavior of related differential equations, such as exponential and exponentially damped functions.
  • Modifying the formulas of oscillatory functions to see how the dependence on x affects their frequency and damping.
  • Drawing conclusions about how different terms in a differential equation influence the characteristics of its solutions.
1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)