PCSI - Lycée CARNOT Simulations sous Python
Simulations+sous+Python+
!"#$%&#'"#("#)*#"+&#'"#,-./0+",#'"+#+01%/.&023+#+%,#'04",+"+#+0&%.&023+#567+08%"+#"3#"15/27.3&#/"#/290(0"/# '"#
5,29,.11.&023#*7&623:#!;"340,233"1"3&#'"#&,.4.0/#(620+0#"+&#<57'",:#=/#2>>,"#%3"#5,-+"3&.&023#(2112'"?#.4"(#%3"#
(23+2/"#'"#+.0+0"?#'"+#0(@3"+#';"A-(%&023?#"&(:::#
Introduction+:+
B%C'"/D#'"#/.#5,29,.11.&023#>23'.1"3&./"?#0/#"+&#52++0$/"#';"15/27",#+2%+#*7&623#'"+#>23(&023+#(2,,"+523'.3&#D#
'"+#5,2(-'%,"+#(2150/-"+#'.3+#'"+#$0$/02&6E8%"+#&-/-(6.,9".$/"+#3211-"+#12'%/"+:#
F3#,"&0"3',.#5.,10#("%AC(0#G#
3%157?#5",1"&&.3&#/"#(./(%/#3%1-,08%"?#
+(057?#'-42/%"#.%#(./(%/#+(0"3&0>08%"#H03&-9,.&023#';-8%.&023#'0>>-,"3&0"//"+?#&,.0&"1"3&#'"#+093./:::I#
1.&5/2&/0$?#%&0/"#52%,#/"#&,.(-#'"#9,.56"+:::#
!"+#12'%/"+#'204"3&#J&,"#(6.,9-+#5,-./.$/"1"3&#D#/;.55"/#';%3"#>23(&023#(2,,"+523'.3&":#=/#"+&#';%+.9"#'"#
,"3211",#%3#12'%/"?#5.,#"A"15/"#52%,#/"#12'%/"#3%157?#+"/23#/.#(211.3'"#G#0152,&#3%157#.+#35#
!;.55"/#';%3"#>23(&023#(23&"3%"#'.3+#/"#12'%/"#3%157#+"#>",.#./2,+#5.,#G#35:>23(&023#
F3#5"%&#0152,&",#&2%&"+#/"+#>23(&023+#';%3#12'%/"#'233-#H5.,#"A"15/"#+(057I#5.,#/.#(211.3'"#G#>,21#+(057#0152,&#K#
=/#5"%&#J&,"#5/%+#/-9",#'"#3;0152,&",#8%;%3"#+"%/"#>23(&023?#+0#"//"#"+&#/.#+"%/"#"15/27-"?#+"/23#/.#(211.3'"#G##
>,21#+(057:03&"9,.&"#0152,&#2'"03&#
!.#>23(&023#2'"03&#"+&#.03+0#(6.,9-"#D#5.,&0,#'%#+2%+#12'%/"#+(057:03&"9,.&":#
!;"340,233"1"3&#'"#&,.4.0/#+57'",#(6.,9"#5.,#'->.%&#/"+#12'%/"+#L%157?#<(057#"&#M.&5/2&/0$:#
!;%&0/0+.&023#5,.91.&08%"#'"#*7&623#"&#'"#+"+#12'%/"+#(23+0+&"#+2%4"3&#D#+;03+50,",#';%3#"A"15/"#"A0+&.3&#52%,#
/;.'.5&",#D#%3"#32%4"//"#+0&%.&023:::#
1. Tracé+de+graphes+:+
!"#&,.(-#'%#9,.56"#';%3"#>23(&023#>HAI#+%,#%3#03&",4.//"#NA103?#A1.AO#'"#+.#4.,0.$/"#"+&#.0+-1"3&#,-./0+.$/"#D#
5.,&0,#'"#/.#(211.3'"#5/2&?#5,-+"3&"#'.3+#/"#12'%/"#1.&5/2&/0$:575/2&:#
P"5"3'.3&?#0/#>.%&#9.,'",#D#/;"+5,0&#8%"#("#&,.(-#3;"+&#2$&"3%#8%;D#5.,&0,#';%3#-(6.3&0//233.9"#'"#4./"%,+#
3%1-,08%"+?#'->030#D#5.,&0,#'"#/.#(211.3'"#/03+5.("?#5,-+"3&"#'.3+#/"#12'%/"#3%157:##
Q;%3"#>.R23#5/%+#9-3-,./"?#/;-&%'"#'"#>23(&023#(23&03%"#+"#>",.#&2%S2%,+#5.,#'"+#5,2("++%+#'"#'0+(,-&0+.&023#
8%0#423&#1"&&,"#"3#S"%#%3#(",&.03#5.+#';03(,-1"3&.&023?#+%+("5&0$/"#'"#52+",#'"+#'0>>0(%/&-+#"3#(.+#'"#(620A#
",,23-:#
!"#théorème)de)Shannon#+&05%/"#8%"#52%,#'0+(,-&0+",#%3"#>23(&023#>HAI#'"#5-,02'"#)?#0/#>.%&#/.#'-(2%5",#.4"(#
'"+#03&",4.//"+#TA#'"#'0+(,-&0+.&023#'"#/239%"%,#H3"&&"1"3&I#03>-,0"%,"#D##)UV#W#+20&#"3(2,"#%3"#>,-8%"3("#
';-(6.3&0//233.9"#.%#1203+#-9./"#.%#'2%$/"#'"#/.#>,-8%"3("#>23'.1"3&./"#'%#+093./#>HAI:#<0#("&&"#(23'0&023#
3;"+&#5.+#,"+5"(&-"?#/"#&,.(-#+",.#.$",,.3&#8%"/#8%"#+20&#/;./92,0&61"#"15/27-:#
#
).5",#/.#+-8%"3("#+%04.3&"?#2$+",4",#/"#,-+%/&.&?#5%0+#,"(211"3(",#52%,#'"+#4./"%,+#'"#3%15203&+#'"#XYY#W#
VYY?#"&#XYYY:#P23(/%,":#
PCSI - Lycée CARNOT Simulations sous Python
>,21#3%157#0152,&#K#
0152,&#1.&5/2&/0$:575/2&#.+#5/&#
5/&:(/>HI#
Z">>.("#%3"#>09%,"#&,.(-"#5,-(-'"11"3&#
3%15203&+#[#V\#
A[/03+5.("HY?XYYK50?3%15203&+I#
5/&:5/2&HA?+03HAII#
5/&:&0&/"H]+03HAIW321$,"#'"#5203&+#[#]^+&,H3%15203&+II#
5/&:7/01HCX?XI#
5/&:+62_HI#
#
2. Présentation+de+la+méthode+d’Euler.+
P"&&"#1-&62'"#5",1"&#/.#,-+2/%&023#';-8%.&023+#'0>>-,"3&0"//"+#'%#5,"10",#2,',"?#"&#(211"#23#/"#4",,.#5/%+#
/203?# ';.%&,"+# -8%.&023+# '0>>-,"3&0"//"+?# 52%,4%# 8%;"//"+# 5%0++"3&# +;-(,0,"# (211"# %3# +7+&E1"# ';-8%.&023+#
'0>>-,"3&0"//"+#';2,',"#X:#
#
`3"#-8%.&023#'0>>-,"3&0"//"#';2,',"#X# +;-(,0&#>2,1"//"1"3&#G# 7;#[# >H7HAI?# AI##2a#7;[#'7U'A#"+&#/.# '-,04-"#'"# /.#
9,.3'"%,#7#5.,#,.552,&#D#/.#4.,0.$/"#A#"&#>#"+&#%3"#>23(&023#52,&.3&#+%,#7#2%#A:#
#
!.# 1-&62'"# ';b%/",# (23+0+&"# D# ,"15/.(",# /.#
,"/.&023# '0>>-,"3&0"//"# 52,&.3&# +%,# '"+# >23(&023+#
(23&03%"+# '"# /.# 4.,0.$/"# A# 5.,# %3"# ,"/.&023#
0&-,.&04"#+%,#'"+#9,.3'"%,+#'0+(,E&"+#W#/.#4.,0.$/"#
A#3;"+&#5/%+#(23&03%"?#1.0+#03(,-1"3&-"#+"/23#%3#
5.+#TA#$0"3#(620+0:#
#
B# 5.,&0,# '"# 4./"%,+# 030&0./"+# (233%"+?# '"# 4./"%,+#
A2#"&#7
2#[#7HA
2I?# "//"# 5",1"&&,.# '"# '-'%0,"# '"#
5,2(6"# "3# 5,2(6"# /"+# 4./"%,+# +%(("++04"+# 5,0+"+#
5.,#7#52%,#/"+#4./"%,+#03(,-1"3&-"+#Ac#[#A2#^#c:TA:#
#
!;-8%.&023#'0>>-,"3&0"//"#'233"#%3"#"A5,"++023#'"#/.#4.,0.&023#'0>>-,"3&0"//"#G#
# # '7#[#>H7HAI?AI:'A## HXI#
#
!.#'0+(,-&0+.&023#'%#5,2$/E1"#(23+0+&"#D#,"15/.(",#'A#5.,#/"#5.+#TA:##
!.# 4.,0.&023# 03>030&-+01./"# '7# [# 7HA# ^'AI# d#7HAI#'"40"3&#./2,+#%3"#5"&0&"#4.,0.&023#"3&,"#'"%A#4./"%,+#
+%(("++04"+#'"#A#G##7HAc^XI#d#7HAcI#
#
!.#,"/.&023#HXI#+"#&,.3+(,0&#./2,+#5.,#G##7HAc^XI#d#7HAcI#[#>H7HAcI?#AcI:TA#
#
F3#5"%&#'23(#'-'%0,"#7HAc^XI#D#5.,&0,#'"#/.#(233.0++.3("#'"+#4./"%,+#.3&-,0"%,"+#H7c?#AcI:#
#
*.,10# '04",+"+# +%$&0/0&-+?# 23# ,"1.,8%",.#8%;"3#9-3-,./#/"+#>23(&023+#%&0/0+-"+#"3#+(0"3("+#567+08%"+#3"#+"#
3211"#5.+#+7+&-1.&08%"1"3&#>?#30#7?#"&#8%"#/.#4.,0.$/"#"+&#+2%4"3&#/"#&"15+?#32&-#&:#
#
`3#.+5"(&#"++"3&0"/#,-+0'"#'.3+#%3# (620A#(234"3.$/"#'%# 5.+#';03(,-1"3&.&023?#8%0#'20&# J&,"#+%>>0+.11"3&#
,-'%0&#52%,#(23'%0,"#D#'"+#,-+%/&.&+#(234",9".3&#4",+#/.#+2/%&023#'"#/;-8%.&023#'0>>-,"3&0"//":#
7HAI#
x
xo
yo = y(xo)
xk
xk+1
yk
yk+1
PCSI - Lycée CARNOT Simulations sous Python
exemple)introductif):))
*,"323+# /"# (.+# ';%3"# '-(,20++.3("# ,.'02.(&04":#P"#56-321E3"#"+&#'-(,0&#5.,#/;-8%.&023#'0>>-,"3&0"//"#G#
##2a#LH&I# "+&# %3"# >23(&023# (23&03%"# '"# /.# 4.,0.$/"# ,-"//"# &:# !.# (23+&.3&"# τ#5.,.1E&,"#/"#
5,2$/E1":#F3#5,"3',.#5.,#"A"15/"#e#[#XY#+:#
L2%+# .//23+# ,"15/.(",# &# 5.,# %3"# 9,.3'"%,# 03(,-1"3&-"?# '0+(,E&"?# &# [# 0:Δ&# 2a# 0# "+&# %3# "3&0",# "&# Δ&# /"# pas+
d’incrémentation:#
#
!.#>23(&023#LH&I#"+&#./2,+#,"15/.(-"#
5.,#%3"#+%0&"#3%1-,08%"#%N0O#'->030"#
par+ itération#D#5.,&0,#'"#/;-8%.&023#
'0>>-,"3&0"//"#'0+(,-&0+-"#G##
#'L#[#LH&^'&I#d#LH&I#[#CLH&I:'&Ue#
8%0# (23'%0&# D#G# # LN0^XO#[#LN0O#d#
LN0O:HΔ&#U#eI:#
#
F3#5,252+"#(0C'"++2%+#%3#
./92,0&61"#,-523'.3&#D#("#
5,2$/E1"#G##
]]]'-(,20++.3("#,.'02.(&04"]]]#
>,21#+(057#0152,&#K#
>,21#57/.$#0152,&#K#
#
!"#$%&'()*$(+),"-,.*/,"0()$#1&*$(+),
'">#5.+H&Y?&X?3%15203&+I#G#
,"&%,3#H&XC&YIU3%15203&+#
&Y#[#Y#
&X#[#VY#
3%15203&+#[#\#
&[&Y#
6#[#5.+H&Y?&X?3%15203&+I#
#
!2+)$&-2$(+),"%,3*,3(/$%,"%/,$(,
.$+(0++"[NYO#
>2,#1#03#,.39"#H3%15203&+CXIG#
&[&^6#
.$+(0++":.55"3'H&I#
5,03&H.$+(0++"I#
#
Z(./(%/#'"#L0#
L[XYYY#
2,'233""[NLO#
>2,#3#03#,.39"H3%15203&+CXIG#
L[L^HCLIKY:XK6#
2,'233"":.55"3'HLI#
5,03&H2,'233""I#
7/01HY?XYYYI#
L#
&#
LY#
&0#
&0^X#
PCSI - Lycée CARNOT Simulations sous Python
5/2&H.$+(0++"?2,'233""I#
+62_HI#
#
4565,7,3*,2+''*)"%,*..%)",.%&'%$,"0*8+-$%&,-),#3#'%)$,9,3*,:(),"0-)%,3(/$%5,;*,3(1)%,<,*=/2(//%>?@,A"#:()($,-)%,3(/$%,9,-),
/%-3,#3#'%)$B,C-(,%/$,%)/-($%,&%'.3(%,/-22%//(D%'%)$,9,'%/-&%,"%,30()2&#'%)$*$(+)5,
#
V:X B'.5&",#("&#./92,0&61"#D#/;-&%'"#'"#/;-42/%&023#'"#/.#&"3+023#%H&I#/2,+#'"#/.#(6.,9"#';%3#(23'"3+.&"%,#D#
&,.4",+#%3#,-+0+&2,?#+2%+#%3"#&"3+023#b#[#XY#g:#%H&I#"+&#'->030"#5.,#/;-8%.&023#'0>>-,"3&0"//"#G#
#
F3#+%552+"#%HYI#[#V?Y#g#W##h[#X?Y:XYi#j#"&#P#[#X?Y:XYCk#l:#
#
V:V )"+&",#/"#(2152,&"1"3&#'"#/;./92,0&61"#"3#>.0+.3&#4.,0",#/"#321$,"#'"#5203&+#(./(%/-?#5%0+#"3#12'0>0.3&#
/"#5.+#';03(,-1"3&.&023?#/"#321$,"#'"#5203&+#(./(%/-+?#/;03&",4.//"#';-&%'":::##
#
3. Résolution+d’équations+différentielles+et+graphe+de+la+solution.+
!.#(211.3'"#2'"03&?#'0+5230$/"#+%,#/"#12'%/"#+(057:03&"9,.&"?#+",.#/;2%&0/#5,03(05./:#b//"#"+&#$.+-"#+%,#%3#
./92,0&61"#'"#1J1"#&75"#8%"#/.#1-&62'"#';b%/",?#1.0+#2>>,.3&#%3"#1"0//"%,"#(234",9"3("#4",+#/.#+2/%&023#
"A.(&"#'"#/;-8%.&023#'0>>-,"3&0"//":#
#
3.1 Equation)différentielle)du)premier)ordre.)
P23+0'-,23+#/"#(.+#'"#/;-8%.&023#'0>>-,"3&0"//"#G##
𝑑𝑢𝑑𝑡+1𝜏𝑢𝑡=0#
F3#,"(233.m&,.#$0"3#+n,#/.#+0&%.&023#';%3#+7+&E1"#/03-.0,"#';2,',"#X#"3#,-901"#/0$,"?#.4"(#%3"#(23+&.3&"#
'"#&"15+#e:#
]]],-+2%',"#%3"#bQ#'%#5,"10",#2,',"]]]#
>,21#3%157#0152,&#K#
0152,&#1.&5/2&/0$:575/2&#.+#5/&#
0152,&#+(057:03&"9,.&"#
5/&:(/>HI#
'",04""#[#/.1$'.#%?&#G#CXYYK%#
!,3*,:+)2$(+),3*'="*,.%&'%$,"%,&#/-'%&,3*,/#C-%)2%,"%,2&#*$(+),,
!,"E-)%,:+)2$(+),F)+&'*3%'%)$,"%:,&%$-&)G,C-*)",%33%,)%,2+'.+&$%,
!,C-E-)%,2+''*)"%,
%Y#[#XY#
&#[#/03+5.("HY?Y:Y\?XYYI#
%o3%1#[#+(057:03&"9,.&":2'"03&H'",04""?#%Y?&I#
5/&:5/2&H&?%o3%1I#
B#5.,&0,#'"#/;"A"15/"#5,252+-#(0C'"++%+?#&,.0&",#/"#5,2$/E1"#+%04.3&#G##
Ski+de+vitesse+(Kilomètre+Lancé)##
Q.3+#("&&"#-5,"%4"?#/"#+c0"%,?#'2&-#';%3#-8%05"1"3&#+5-(0./?#5,"3'#'"#/.#40&"++"#"3#'"+("3'.3&#%3"#5"3&"#>2,&"#'.3+#
%3"#&,.S"(&20,"#,"(&0/093":#!"+#40&"++"+#.&&"03&"+#+23&#(23+0'-,.$/"+p#q"%,"%+"1"3&?#/.#'"+("3&"#"+&#,-./0+-"#+%,#%3"#
50+&"#5.,>.0&"1"3&#'-9.9-":#
!;.55/0(.&023#'"#/.#hlQ?#5,"3.3&#"3#(215&"#/"#520'+#'%#+c0"%,?#/.#>2,("#'"#,-.(&023#'"#/.#50+&"#"&#/"#>,2&&"1"3&#'"#/;.0,#
(23'%0&?#"3#5,2S"(&023#+%,#/;.A"#(2,,"+523'.3&#D#/.#/093"#'"#5"3&"?#D#/;-8%.&023#'0>>-,"3&0"//"#G#
PCSI - Lycée CARNOT Simulations sous Python
##HXI# # .4"(#9#[#r?sX#1:+CV:#
),.(",#/"+#9,.56"+#&,.'%0+.3&#/;-42/%&023#'"#/.#40&"++"#4H&I:#
F3#03'08%"#(0C'"++2%+#/"+#'233-"+#3%1-,08%"+#3-("++.0,"+#D#/.#+01%/.&023:##
M2'E/"#.4"(#>2,("#'"#>,2&&"1"3&#8%.',.&08%"#G#l#[#c:4t##.4"(#### #
5"3&"#HuI#
vY#
5"3&"#H,.'I#
Y?\Vv#
1.++"#Hc9I#
wY#
PA#
Y?v\#
1.++"#42/%108%"#'"#/;.0,#Hc9:1CvIK#
X?YYs#
+%,>.("#H1tI#
Y?\\#
K#(23'0&023+#G#*#[#Y?s#$.,#W#)#[#Vwv#x#[#YuP:#
#
#
+
4. Résolution+d’une+équation+différentielle+du+second+ordre.+
!"# 5,03(05"# ';%3"# &"//"# ,-+2/%&023# "+&# '"# ,--(,0,"# /;-8%.&023# +2%+# /.# >2,1"# ';%3# +7+&E1"#';-8%.&023+#
'0>>-,"3&0"//"+#'%#5,"10",#2,',":#
#
!;"A"15/"#(0C'"++2%+#52,&"#+%,#/.#+0&%.&023#&,E+#+015/"#';%3"#(6%&"#4",&0(./"#+.3+#>,2&&"1"3&#'.3+#/"#(6.15#
'"#5"+.3&"%,#%30>2,1":#b//"#"+&#'-(,0&"#5.,#/;-8%.&023#'0>>-,"3&0"//"#G##𝑧=−𝑔&##8%"#/;23#4.#,--(,0,"#(211"#/"#
+7+&E1"#G##𝑣=−𝑔&,&&𝑣=&𝑧&:##
Q%#5203&#'"#4%"#+73&.A08%"?#("(0#"+&#,-./0+-#"3#(,-.3&#'"+#/0+&"+#>.0+.3&#03&",4"30,#/"+#(22,'233-"+#'"#52+0&023#
"&#'"#40&"++"#'%#12$0/"?#"&#"3#>.0+.3&#S2%",#/.#(211.3'"#2'"03&#+%,#%3"#-8%.&023#52,&.3&#+%,#("+#/0+&"+:#
HHH&#/+-"&%,-)%,IJ,"-,/%2+)",+&"&%HHH,
!%K%'.3%,7,2L-$%,3(=&%,D%&$(2*3%,"E-)%,L*-$%-&,"%,M?,'N$&%/,
>,21#3%157#0152,&#K#
0152,&#1.&5/2&/0$:575/2&#.+#5/&#
>,21#+(057:03&"9,.&"#0152,&#2'"03&#
5/&:(/>HI#
#
!2&#*$(+),"0-),D%2$%-&,"0#$*$,>.+/($(+)BD($%//%@B,,2++&"/,O,>PB"P"$@,
'">#"8%.'0>>H(22,'+?&IG#
y#[#(22,'+NYO#
4y#[#(22,'+NXO#
.y#[#Cr:sX#
,"&%,3N4y?.yO#
#
!"#:()($(+),"%/,2+)"($(+)/,()($(*3%/,
yY#[#XY#
4yY#[#Y#
(22,'+Y#[#NyY?4yYO#
#
1 / 7 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !