Overview
Write a program to calculate the component voltages for the following series resonant RLC circuit.
The input voltage will be a step voltage that is 0 volt before time t = 0 and Vin volt after time t = 0. We will assume Vin is 10V.
Electrical Theory
The behaviour of the circuit depends on the values of the circuit components: resistance R, inductance L and capacitance C. We will assume R is always present in the circuit (R > 0), but that either the L or C or both L and C could be absent. Different formulas apply in each case.
Your program will calculate and display the voltages across each of the components present in the circuit at 101 equally spaced times from time t = 0 until time t = tmax. The time step will be tmax/100.