# Using laplace transform to find the expression for voltage in the circuit

Let's say we have the following circuit: Generator in the circuit has sinusoidal waveform $$u_g(t)=\sin\omega t$$. Other known values: $$L=0.25H\\ R=1\Omega \\ C=0.5F \\ \omega=1 \frac{rad}{s} \\ k=1$$

Before the P2 switch is closed, we had steady state in the circuit, at the same time, switch P1 was in the position 1. At one of the moments, when voltage on capacitor is at its maximum, switch P2 closes and switch P1 goes to the position 2. Determine the expression for capacitor voltage after that moment.

I know that i need to analyze this circuit in steady state before switches change their position in order to find initial values for the capacitors and inductors.

Basically, what i need here is the expression for the current in the circuit and voltage on $$C$$. When i consider this circuit in the laplace domain, it is the same as it is here, since there is no energy in $$C$$ and $$L$$ before the first steady state.

Since generator is sinusoidal, we have that $$U_g(S)=\frac{\omega}{s^2+\omega^2}$$

furthermore, if we look at the circuit, we have that $$U_g(S)=I(s)(Ls-kLs+\frac{1}{Cs} + R + Ls -kLs)$$

Since k=1, this becomes: $$U_g(S)=I(s)(R + \frac{1}{Cs} )$$

From here, we have:

$$I(S)=\frac{U_g(S)}{R + \frac{1}{Cs}} =\frac{\omega}{s^2+\omega^2}\frac{1}{R + \frac{1}{Cs}}$$

and then since $$U_c(S)=\frac{I(S)}{Cs}$$ we have

$$U_c(S)=\frac{\omega}{s^2+\omega^2}\frac{1}{Cs(R + \frac{1}{Cs})} =\frac{\omega}{s^2+\omega^2}\frac{1}{RCs + 1}$$

Now, based on values we have, these two expressions become:

$$I(S)=\frac{1}{s^2+1}\frac{1}{1 + \frac{2}{s}}=\frac{1}{s^2+1}\frac{s}{s + 2}$$

$$U_c(S)=\frac{1}{s^2+ 1}\frac{1}{\frac{s}{2} + 1} =\frac{1}{s^2+ 1}\frac{2}{s+2}$$

Now, when i decompose these two expressions using partial fraction decomposition i end up with:

$$I(s)=\frac{2}{5} \frac{s}{s^2+1} + \frac{1}{5} \frac{1}{s^2+1} -\frac{2}{5} \frac{1}{s+2}$$

$$U_c(s)=-\frac{2}{5} \frac{s}{s^2+1} + \frac{4}{5} \frac{1}{s^2+1} +\frac{2}{5} \frac{1}{s+2}$$

Which means that $$u_c(t)=(-\frac{2}{5}\cos t + \frac{4}{5}\sin t +\frac{2}{5}e^{-j2t})u(t)$$

$$u(t)$$ is heaviside function

Now, how am i supposed to determine when is this $$u_c(t)$$ maximum value, i mean first derivative method could be option but it seems too complicated in this particular example due to the fact that all these functions can be expressed as exponentials with different arguments so finding maximum would be quite messy job. Usually, with problems like this, i always ended up with single sine (or cosine) and maximum could be determined by inspection easily, so i am thinking that i maybe made a mistake somewhere. So i am wondering what i did wrong here. Any help appreciated!

• I'm voting to close this question as off-topic because, even though circuit analysis and analog signal processing intersect, you're more likely to attract good answers in electronics.stackexchange. – MBaz Feb 19 at 14:37