In this work three examples of textbook circuits (resistor-capacitor, resistor-inductor and resistor-inductor-capacitor) have been modeled by employing the Euler method for the approximate solution of differential equations using algorithms implemented in the Python programming language. The aim of this work was to demonstrate how simple, yet highly effective, algorithms can be neatly implemented in one of the currently most popular programming languages for scientific applications. At the same time, the visualization of the results allows for a detailed introduction to the properties of the circuits most frequently commented on in all the relevant textbooks. Our code, as provided to the reader, includes detailed comments, and can easily be modified to model other similar systems. Instructions on how to prepare tasks for students have been also provided.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.