## Etablissement du régime sinusoïdal permanent dans un circuit RLC¶

In [1]:
%display latex

In [2]:
omega=2*pi*10^4;Q=5;f=10^3;

In [3]:
var('t')
y=function('y')(t)
eq=diff(y,t,2)+omega*diff(y,t)/Q+omega^2*y==omega^2*cos(2*pi*f*t);eq

Out[3]:
In [4]:
sol1=desolve(eq,y,ics=[0,0,0],show_method=True) #resolution pour diffĂ©rentes conditions initiales
sol2=desolve(eq,y,ics=[0,-1,0],show_method=True)
sol3=desolve(eq,y,ics=[0,0.5,-1],show_method=True);sol1,sol2,sol3;

In [5]:
g1=plot(sol1[0],t,0,2*10^-3,color='purple',thickness=2);
g2=plot(sol2[0],t,0,2*10^-3,color='magenta',thickness=2);
g3=plot(sol3[0],t,0,2*10^-3,color='green',thickness=2);
show(g1+g2+g3,gridlines='major',axes_labels=["$t$","$s(t)$"],fontsize=14)

In [6]:
omega=2*pi*10^4;Q=5;f=0.8*10^4;
var('t')
y=function('y')(t)
eq=diff(y,t,2)+omega*diff(y,t)/Q+omega^2*y==omega^2*cos(2*pi*f*t);eq

Out[6]:
In [7]:
sol1=desolve(eq,y,ics=[0,0,0],show_method=True)
sol2=desolve(eq,y,ics=[0,-1,0],show_method=True)
sol3=desolve(eq,y,ics=[0,0.5,-1],show_method=True)
g1=plot(sol1[0],t,0,2*10^-3,color='purple',thickness=2)
g2=plot(sol2[0],t,0,2*10^-3,color='magenta',thickness=2)
g3=plot(sol3[0],t,0,2*10^-3,color='green',thickness=2)
show(g1+g2+g3,gridlines='major',axes_labels=["$t$","$s(t)$"],fontsize=14)

In [8]:
omega=2*pi*10^4;Q=5;f=5*10^4;
var('t')
y=function('y')(t)
eq=diff(y,t,2)+omega*diff(y,t)/Q+omega^2*y==omega^2*cos(2*pi*f*t);eq
sol1=desolve(eq,y,ics=[0,0,0],show_method=True)
sol2=desolve(eq,y,ics=[0,-1,0],show_method=True)
g1=plot(sol1[0],t,0,2*10^-3,color='purple',thickness=2)
g2=plot(sol2[0],t,0,2*10^-3,color='magenta',thickness=2)
show(g1+g2,gridlines='major',axes_labels=["$t$","$s(t)$"],fontsize=14)