Problem Set 2
ENGR 12, Spring 2026.
| Due Date | Thu, Feb 5, 2026 |
| Turn in link | Gradescope |
| URL | emadmasroor.github.io/E12-S26/Homework/HW2 |
Points Distribution
For this assignment, each of problems 1 through 5 are equally weighted. Scores will be assigned on a 3-2-1-0 scale.
For problems 1 through 3, the possible scores are 3,2,1 and 0. For problems 4 and 5, the possible scores are 6,4,2 and 0.
| Problem | Part | % Weightage | Points |
|---|---|---|---|
| Problem 1 | 1.1 | 10 | 3 |
| 1.2 | 10 | 3 | |
| Problem 2 | 2.1 | 10 | 3 |
| 2.2 | 10 | 3 | |
| Problem 3 | 3.1 | 10 | 3 |
| 3.2 | 10 | 3 | |
| Problem 4 | 20 | 6 | |
| Problem 5 | 20 | 6 | |
| Total | 100 | 30 |
1 RC Circuit with constant input
Consider the circuit diagram shown below. The capacitor starts out with no charge across it, i.e., \(v_C=0\) at \(t=0\).
1.1 Voltage across capacitor and resistor
In class, we wrote down an equation for \(v_C(t)\).
Use this equation, and the circuit diagram, to plot, on the same set of axes, the voltage across the capacitor \(v_C(t)\) and across the resistor \(v_R(t)\) as a function of time for the first three seconds of the circuit’s operation. You must use correct units in your answer. Also write down a mathematical expression for these two curves, without using any arbitrary constants.
1.2 Power dissipation
The power dissipated by an electrical component equals the voltage across it times the current through it. With this principle in mind, we can write the following equation for the power \(p_R\) dissipated by a resistor.

\[ \begin{aligned} p_R = v_R i_R &= (i_R R) i_R = i_R^2 R \\ &= v_R \left( \frac{v_R}{R} \right) = \frac{v_R^2}{R} \end{aligned} \]
- Write a mathematical expression for the power dissipated by the resistor in Figure 1, assuming that \(v_C(0) = 0\) as before. If you use units correctly, this answer should be in Watts.
- Use this expression to calculate the total amount of energy dissipated by the circuit in its first ten seconds of operation. Give your answer in Joules or multiples of Joules.
- If there was no capacitor in the circuit in Figure 1, how much more energy would be dissipated by the resistor in the first ten seconds of its operation? Divide this number by the answer from (b) to give a ratio.
2 Deriving the equations for a first-order circuit
2.1 Two capacitors in series
Consider the circuit shown below.

Using Kirchhoff’s Laws, derive a differential equation for \(v_2\) and a differential equation for \(v_1\).
State whether the equations are coupled or uncoupled, and linear or nonlinear.
2.2 Two resistors in series
Consider the circuit below.

For this circuit, write down mathematical expressions for the voltage across the resistors and across the capacitor as functions of time.
Also plot these expressions on the same set of axes up to \(t=20\) seconds. Assume that the voltage across the capacitor is initially zero.
It’s possible to do this problem in many ways, but I suggest the following procedure. First, find a differential equation for \(v_c\), the voltage across the capacitor. It is possible to do this by using Kirchhoff’s Laws and your knowledge of E11. You will have to eliminate all other variables so that you have an equation in which \(v_c\), its derivative, and \(v_s\) appear, but \(v_1\) and \(v_2\) do not directly appear.
Then, solve this differential equation (using integration) to arrive at a mathematical expression for \(v_c(t)\).
Next, use your expression for \(v_c\) to find the voltage \(v_1\) and \(v_2\) across the resistors by using the KCL or KVL equations. All three are functions of time.
3 Initial Value Problems and integration
3.1 First order systems with zero or constant input
Solve the following initial value problems by integration. The result should be a function \(x(t)\) in which no unknowns remain.
- \(\dot{x} + 3x = 0, x(0) = 2\)
- \(\dot{x} - 3x = 0, x(0) = 2\)
- \(\dot{x} + 3x - 5 = 0, x(0) = 2\)
What do your answers to 1 and 2 above tell us about the physical implication of a circuit in which the resistance were negative? (This doesn’t actually happen; resistance is by nature positive)
3.2 First order systems with ramp input
By multiplying an ‘integrating factor’ of \(e^{2t}\) to both sides of the following equation, solve for \(x(t)\) in the following initial value problem. Give your answer as a mathematical expression in terms of \(t\).
\[\dot{x} + 2x = 3t, x(0) = 2\]
Your function, when plotted against time, should look like the plot below.

4 Transient and steady-state response
The ‘steady state’ is the behavior that a system displays at large times.
- What is the steady-state voltage across each of the two resistors below respectively?

- What is the steady-state voltage across the two resistors and across the capacitor respectively? For this, you should be able to use your answer from earlier.

- In class, we saw that the response of a first-order system to a ‘ramp input’ looks like a curve followed by a straight line. For the system \[\dot{x} + a x = f(t)\] subjected to a ramp input of the form \(f(t) = c t\), is the slope of the steady-state response equal to the slope of the input?
You may answer this question in any way you like:
A mathematical approach would be to derive an expression for the response and determine the slope at large times.
A more ‘ad-hoc’, engineering approach would be to plot \(x(t)\) and \(f(t)\) and visually compare the slope.
- Make another copy of the figure you made for Section 1.1. On this version of your figure, draw a vertical line representing the time at which the system can be said to have reached steady state. Use the convention discussed in lecture 4, which states that transients die out when \(t = 5\tau\).
In MATLAB, you can do this using the xline function.
5 Numerical Solution of Initial Value Problems
This is an extension of the in-class activity on Thursday.
Use ode45 or solve_ivp or NDSolve to determine the voltage across the capacitor from \(t=0\) to \(t=20\). Plot the results on a single set of axes for three values of \(R= \{ 50, 500, 1000 \} k\Omega\). In all cases, assume that the capacitor starts out with a voltage of \(+2\) volts across it. On the same set of axes, also plot \(v_s(t)\), which is given in the problem.

In addition to the plot, please turn in a printed version of your code, formatted and syntax-highlighted. You may take a screenshot to do this, or use an online syntax highlighting service such as this one. Make sure that your code is legible.
Commenting your code is a very important practice, but will not count toward the grading of your assignment.
Do not submit a file containing your code.