Here is a simple circuit containing a sinusoidal voltage source, a resistor, inductor and diode. The presence of the diode introduces nonlinearity and allows for the possibility of complex behavior.
We model the diode as having a piecewise–linear capacitance with a small offset voltage.
The equations for the charge and current in the diode can be written directly in Mathematica.
This substitutes values for parameters into the equations.
It is possible to solve the equations by using the Mathematica function NDSolve.
Here are the solutions for the charge as a function of time for three values of the driving voltage ÷….
Here are the parametric plots of the charge versus current for the same three values of the driving voltage ÷….
This draws a bifurcation diagram showing how the oscillations of the charge first period double, then eventually become chaotic as the driving voltage increases.