Currents whose direction does not change with time through a load, are known as direct current (D.C.), whereas currents whose direction changes periodically through a load are known as alternating currents (A.C.) and the voltage is known as alternating voltage (ac voltage).
Electrical energy in a.c. form can be easily transmitted over long distances without much loss. A.C. voltage can be easily converted to other voltages by step up/step down transformers.
An alternating current changes its direction of flow periodically. For a half cycle, it flows in one direction and for the next half cycle, it flows in opposite direction.

Mean value of AC is the total charge that flows through a circuit element in a given time interval divided by the time interval.
Imean=∫T0IdtTImean=∫0TIdtT
For half cycle
Imean=∫T20IdtT2Imean=∫0T2IdtT2
Imean=2T∫T20I0sinωdtImean=2T∫0T2I0sinωdt
Imean=2I0T[−cosωtω]T20Imean=2I0T[-cosωtω]0T2
Imean=2I02π[−cosπ−cos0]Imean=2I02π[-cosπ-cos0] …..(∵ω=2πT∵ω=2πT)
Imean=2I0πImean=2I0π
Note: For complete cycle, mean value = 0
I2rms=1T∫T0I2dtIrms2=1T∫0TI2dt
I2rms=1T∫T0I20sin2ωdtIrms2=1T∫0TI02sin2ωdt
I2rms=1T∫T0I20(1−cos2ωtdt)2Irms2=1T∫0TI02(1-cos2ωtdt)2
I2rms=I202T[T−[sin2ωt]T02ω]Irms2=I022T[T-[sin2ωt]0T2ω]
I2rms=I202T[T−(sin2ωT−sin0)2ω]Irms2=I022T[T-(sin2ωT-sin0)2ω]
Irms=I0√2Irms=I02
V = Vm sinωt

The instantaneous power dissipated in the resistor is
p=I2R=I2mRsin2ωtp=I2R=Im2Rsin2ωt
The average value of ‘p’ over a cycle is
¯p=p¯=<I2RI2R> = <I2mRsin2ωtIm2Rsin2ωt> ….<sin2ωtsin2ωt>=12=12
¯p=I2R2p¯=I2R2
Similarly Vrms=Vm√2=0.707VmVrms=Vm2=0.707Vm
To find the value of current through the resistor, we apply ohm’s law
V = IR
Vmsinωt=IRVmsinωt=IR
I=VmRsinωtI=VmRsinωt
Since R is a constant, we can write this equation as
I=ImsinωtI=Imsinωt

In a pure resistor, the voltage and current are in phase. The minima, zero, and maxima occur at the same respective times.
Let the voltage across the source be V = Vm sinωt.

If, there be no resistor in the circuit,
V−LdIdt=0V-LdIdt=0
Vmsinωt−LdIdt=0Vmsinωt-LdIdt=0
dIdt=VmLsinωtdIdt=VmLsinωt
∫dIdtdt=VmL∫sinωtdt∫dIdtdt=VmL∫sinωtdt
I=VmL(−cosωtω)I=VmL(-cosωtω)
I=VmωL(−cosωt)I=VmωL(-cosωt) …..[ XL=ωLXL=ωL ]
I=−VmXLsin(π2−ωt)I=-VmXLsin(π2-ωt)
I=I0sin(ωt−π2)I=I0sin(ωt-π2)

In a pure Inductor, the source voltage and the current show that the current lags the voltage by π/2.
The opposing nature of the inductor to the flow of current is called Inductive reactance.
XL=ωL=2πfLXL=ωL=2πfL
Where, L = self-inductance
Let the voltage across the source be V = Vm sinωt to a capacitor only, a purely capacitive ac circuit.

Let q be the charge on the capacitor at any time t. The instantaneous voltage V across the capacitor is
V=qCV=qC
Vmsinωt=qCVmsinωt=qC
q=CVmsinωtq=CVmsinωt
To find the current, we divide the eq. by dt
dqdt=ddt(CVmsinωt)dqdt=ddt(CVmsinωt)
I=CVmcosωt.ωI=CVmcosωt.ω
I=Vm1ωCcosωtI=Vm1ωCcosωt
I=VmXCcosωtI=VmXCcosωt …..[XC=1ωCXC=1ωC]
I=Imsin(ωt+π2)I=Imsin(ωt+π2)

In a pure Inductor, the source voltage and the current show that the current is π/2 ahead of the voltage.
The opposing nature of capacitor to the flow of alternating current is called capacitive reactance.
XC=1ωC=12πfCXC=1ωC=12πfC
Where C = capacitance
V=VmsinωtV=Vmsinωt
I=Imsin(ωt+ϕ)I=Imsin(ωt+ϕ)
P = V × I
P=Vm.Im.sinωt.sin(ωt+ϕ)P=Vm.Im.sinωt.sin(ωt+ϕ)
P=Vm.Im2.2sinωt.sin(ωt+ϕ)P=Vm.Im2.2sinωt.sin(ωt+ϕ)
P=Vm.Im2.[cos(ωt+ϕ−ωt)−cos(ωt+ωt+ϕ)P=Vm.Im2.[cos(ωt+ϕ-ωt)-cos(ωt+ωt+ϕ)
P=Vm.Im2.[cosϕ−cos(2ωt+ϕ)P=Vm.Im2.[cosϕ-cos(2ωt+ϕ)
P=Vm√2.Im√2.cosϕP=Vm2.Im2.cosϕ
P=Vrms.Irms.cosϕP=Vrms.Irms.cosϕ …..[cosϕ=RZcosϕ=RZ]
As cos(2ωt + Φ) for one complete cycle, is ZERO
The term cosΦ is known as the power factor as it determines the power consumed in the circuit.
If q is the charge in the capacitor and I is the current at time t, then applying Kirchhoff’s loop rule.

LdIdt+IR+qC=VLdIdt+IR+qC=V
The voltage between inductor and capacitor is equal to VC – VL. The total voltage given by
V=√V2R+(VC−VL)2V=VR2+(VC-VL)2
V=√IR2+(IXC−IXL)2V=IR2+(IXC-IXL)2
V=I√R2+(XC−XL)2V=IR2+(XC-XL)2
VI=√R2+(XC−XL)2VI=R2+(XC-XL)2
Z=√R2+(XC−XL)2Z=R2+(XC-XL)2
Z = (impedance = Effective resistance of series LCR circuit)
tanϕ=VC−VLVR=XC−XLRtanϕ=VC-VLVR=XC-XLR
When XC = XL, it means
1ωC=ωL1ωC=ωL
12πfC=2πfL12πfC=2πfL
f=12π√LCf=12πLC
It is known as resonant frequency.
A choke coil is an inductor having a small resistance. It is a device used in ac circuits to control current without wasting too much power. As it has low resistance, its power factor cosϕcosϕ is low.
Let a capacitor of capacitance C is initially charged to a charge qm. This capacitor is connected to an inductor (having inductance L) at t=0 sec. Let at t=t sec, the charge upon capacitor and current through the inductor, are q(t) and I(t) are respectively,

VC=VL⇒qC=LdIdtVC=VL⇒qC=LdIdt …..(i)
Let the charge of the capacitor decrease by dq in the time interval from t = t sec to t = (t + dt) sec. Thus current
I=dqdtI=dqdt …..(ii)
From (i) & (ii),
qC=Lddt[−dqdt]=−Ld2qdt2qC=Lddt[-dqdt]=-Ld2qdt2
d2qdt2=−1LC×qd2qdt2=-1LC×q
d2qdt2+1LC×q=0d2qdt2+1LC×q=0
It is a differential equation of 2nd order which is the equation of SHM in differential form. The LC oscillation is similar to the mechanical oscillation. For a simple harmonic oscillator, charge oscillates with natural frequency (ω0)
ω0=1√LCω0=1LC
Transformers are based upon mutual induction which transforms an alternating voltage from one to another of greater or smaller value.

Construction: A transformer consists of two coils wound on a soft iron core, called primary and secondary coils. Let the number of turns in these coils be Np and Ns respectively. The input A.C. voltage is applied across the primary coil whereas the output A.C. voltage is across the secondary coil.
We consider an ideal transformer in which the primary has negligible resistance and all the flux in the core links both the primary and secondary windings. Let Φ be the flux linkage through each of the primary and secondary coils. Then.
Induced emf across the primary coil,
εp=−Npdϕdtεp=-Npdϕdt …(i)
Similarly induced emf across secondary,
εs=−Nsdϕdtεs=-Nsdϕdt …(ii)
From these equations,
AC voltage obtained across secondary / AC voltage applied across primary
=VsVp=εsεp=NsNp=r=VsVp=εsεp=NsNp=r
Where r is called transformation ration. In a transformer, some energy is always lost. The efficiency of a well designed transformer may be upto 95%. If the transformer is assumed to be 100% efficient
p=IpVp=IsVsp=IpVp=IsVs
IpIs=VsVpNsNpIpIs=VsVpNsNp
In actual transformers, small energy losses occur due to the following reasons.