CoCalc Public FilesSolD4.sagewsOpen with one click!
Author: Juan Carlos Bustamante
Views : 48
Compute Environment: Ubuntu 18.04 (Deprecated)
typeset_mode(True)

Question 1

var('t') factor(t^8-2*t^7+4*t^6-4*t^5+5*t^4-2*t^3+2*t^2,t)
t\displaystyle t
(t22t+2)(t2+1)2t2\displaystyle {\left(t^{2} - 2 \, t + 2\right)} {\left(t^{2} + 1\right)}^{2} t^{2}

Question 2

y1(t) = t y2(t)= t^2 y3(t)=t^3 wronskian(y1,y2,y3)
t  2t3\displaystyle t \ {\mapsto}\ 2 \, t^{3}

Question 3

Cette question demande une bonne dose de calculs, pour certains on a recours à un ordinateur.

var('s,t') y1(t) = cos(t) y2(t) = sin(t) y3(t) = e^t
(s\displaystyle s, t\displaystyle t)
M=matrix([[y1(t),y2(t),y3(t)], [diff(y1(t),t),diff(y2(t),t),diff(y3(t),t) ],[diff(y1(t),t,2), diff(y2(t),t,2), diff(y3(t),t,2)] ]) M
(cos(t)sin(t)etsin(t)cos(t)etcos(t)sin(t)et)\displaystyle \left(\begin{array}{rrr} \cos\left(t\right) & \sin\left(t\right) & e^{t} \\ -\sin\left(t\right) & \cos\left(t\right) & e^{t} \\ -\cos\left(t\right) & -\sin\left(t\right) & e^{t} \end{array}\right)
W= wronskian(y1,y2,y3).simplify_full()

On obtient les expressions suivantes pour v1=u1,v2=u2v_1 = u'_1, v_2 = u'_2 et v3=u3v_3 = u'_3, le calcul n'est pas compliqué.

v1=(tan(t)-1)/2 v2(t) = -(tan(t)+1)/2 v3(t)=sec(t)*e^(-t)/2

Vérifions avec l'ordinateur, en utilisant la méthode de Cramer.

G=vector([0,0,sec(t)]) G = G.column() matrix(G)
(00sec(t))\displaystyle \left(\begin{array}{r} 0 \\ 0 \\ \sec\left(t\right) \end{array}\right)
M1 = G.augment(M.matrix_from_columns([1,2])) M1 (det(M1)/W).simplify_trig()
(0sin(t)et0cos(t)etsec(t)sin(t)et)\displaystyle \left(\begin{array}{rrr} 0 & \sin\left(t\right) & e^{t} \\ 0 & \cos\left(t\right) & e^{t} \\ \sec\left(t\right) & -\sin\left(t\right) & e^{t} \end{array}\right)
cos(t)sin(t)2cos(t)\displaystyle -\frac{\cos\left(t\right) - \sin\left(t\right)}{2 \, \cos\left(t\right)}

Cette xpression n'a pas trop l'air de conïncider avec v1v_1 trouvée ci-haut. Mais c'est juste une apparence:

((det(M1)/W) - v1).simplify_full()
0\displaystyle 0

On refait la même chose avec les autres :

M2 = M.matrix_from_columns([0]).augment(G.augment(M.matrix_from_columns([2]))) M2 (det(M2)/W).simplify_trig()
(cos(t)0etsin(t)0etcos(t)sec(t)et)\displaystyle \left(\begin{array}{rrr} \cos\left(t\right) & 0 & e^{t} \\ -\sin\left(t\right) & 0 & e^{t} \\ -\cos\left(t\right) & \sec\left(t\right) & e^{t} \end{array}\right)
cos(t)+sin(t)2cos(t)\displaystyle -\frac{\cos\left(t\right) + \sin\left(t\right)}{2 \, \cos\left(t\right)}
((det(M2)/W) - v2).simplify_full()
0\displaystyle 0
M3 = M.matrix_from_columns([0,1]).augment(G) M3 (det(M3)/W).simplify_trig()
(cos(t)sin(t)0sin(t)cos(t)0cos(t)sin(t)sec(t))\displaystyle \left(\begin{array}{rrr} \cos\left(t\right) & \sin\left(t\right) & 0 \\ -\sin\left(t\right) & \cos\left(t\right) & 0 \\ -\cos\left(t\right) & -\sin\left(t\right) & \sec\left(t\right) \end{array}\right)
e(t)2cos(t)\displaystyle \frac{e^{\left(-t\right)}}{2 \, \cos\left(t\right)}
((det(M3)/W) - v3).simplify_full()
0\displaystyle 0

Maintenant il faut intégrer. Comme on a besoin des constantes d'intégration, on va utiliser des intégrales définies. Ce qu'on fait : u1(t)=0tu1(s)ds u_1(t) = \int_0^t u'_1(s) ds Le choix de la borne inférieure vient de ce que nous avons des conditions initiales avec t0=0t_0 = 0. On fait la même chose pour u2(t)u_2(t) et u3(t)u_3(t)

assume( t > 0) assume(t < pi/2) u1(t) = integrate(v1(s),s,0,t) u2(t) = integrate(v2(s),s,0,t) u3(t) = integrate(v3(s),s,0,t)
var("c1,c2,c3")
(c1\displaystyle c_{1}, c2\displaystyle c_{2}, c3\displaystyle c_{3})

On va déclarer la fonciton y(t)y(t) afin de trouver les conditins sur c1,c2,c3c_1,c_2,c_3 grâce aux conditions initiales.

y(t) = c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t)*y1(t) + u2(t) *y2(t) + u3(t) * y3(t) y(t)
c1cos(t)12(t+log(cos(t)))cos(t)+c3et+12et0te(s)sec(s)ds+c2sin(t)12(tlog(cos(t)))sin(t)\displaystyle c_{1} \cos\left(t\right) - \frac{1}{2} \, {\left(t + \log\left(\cos\left(t\right)\right)\right)} \cos\left(t\right) + c_{3} e^{t} + \frac{1}{2} \, e^{t} \int_{0}^{t} e^{\left(-s\right)} \sec\left(s\right)\,{d s} + c_{2} \sin\left(t\right) - \frac{1}{2} \, {\left(t - \log\left(\cos\left(t\right)\right)\right)} \sin\left(t\right)

Voyons pour les conditions initiales

y(0) #z(t) = diff(y(t),t) #simplify(z(0)) #w(t) = diff(y(t),t,2) #simplify(w(0))
c1+c3\displaystyle c_{1} + c_{3}

On doit calculer y(t)y'(t) et y(t)y''(t) pour obtenir des conditions sur les c1c_1. SAGE ne sais pas dériver u3(t)u_3(t), ce qui est assez étonnant car cette fonction a été définie comme une intégrale. On va donc faire les choses un peu à la main. Noter que y2(t)=ety_2(t) = e^t, de sorte que y3(t)=y3(t)=ety_3'(t) = y_3''(t) = e^t.

Ci bas, on calcule z(t)=y(t)z(t) = y'(t), puis, plus bas encore w(t)=y(t)w(t)= y''(t). On évalue en t=0t=0.

1f6d780d-d815-460d-b123-8ab11422f747s z(t) = diff(c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t) *y1(t) + u2(t) *y2(t),t) + (v3(t) + u3(t))*y3(t) z(0)
c2+c3\displaystyle c_{2} + c_{3}
w(t) = diff(c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t) *y1(t) + u2(t) *y2(t),t,2) + y3(t)*(diff(v3(t),t)+2*v3(t)+u3(t)) w(0)
c1+c3\displaystyle -c_{1} + c_{3}

Ceci fournit le système d'équations à être vérifié par c1,c2,c3c_1,c_2,c_3:

solve([c1+c3==2,c2+c3==-1,-c1+c3==1],[c1,c2,c3])
[[c1=(12)\displaystyle c_{1} = \left(\frac{1}{2}\right), c2=(52)\displaystyle c_{2} = \left(-\frac{5}{2}\right), c3=(32)\displaystyle c_{3} = \left(\frac{3}{2}\right)]]
c1=1/2 c2=-5/2 c3=3/2

Remplaçons :

y(t) = 1/2*y1(t) + -5/2*y2(t) + 3/2*y3(t) + u1(t)*y1(t)+u2(t)*y2(t) + u3(t)*y3(t) y(t).simplify_full()
12(t1)cos(t)+12(0te(s)cos(s)ds+3)et12(cos(t)sin(t))log(cos(t))12(t+5)sin(t)\displaystyle -\frac{1}{2} \, {\left(t - 1\right)} \cos\left(t\right) + \frac{1}{2} \, {\left(\int_{0}^{t} \frac{e^{\left(-s\right)}}{\cos\left(s\right)}\,{d s} + 3\right)} e^{t} - \frac{1}{2} \, {\left(\cos\left(t\right) - \sin\left(t\right)\right)} \log\left(\cos\left(t\right)\right) - \frac{1}{2} \, {\left(t + 5\right)} \sin\left(t\right)

Et vérifions

y(0) z(t) = diff(c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t) *y1(t) + u2(t) *y2(t),t) + (v3(t) + u3(t))*y3(t) z(0) w(t) = diff(c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t) *y1(t) + u2(t) *y2(t),t,2) + y3(t)*(diff(v3(t),t)+2*v3(t)+u3(t)) w(0)
2\displaystyle 2
1\displaystyle -1
1\displaystyle 1

Le calcul de la dérivée tierce, est pénile. Comme plus haut, on le fait un peu manuellement, mais juste un peu.

v(t) = diff(c1*y1(t) + c2 * y2(t) + c3 * y3(t) + u1(t) *y1(t) + u2(t) *y2(t),t,3) + y3(t)*(3*v3(t) + 3*diff(v3(t),t) + diff(v3(t),t,2) + u3(t))
(v(t)-w(t)+z(t)-y(t)).simplify_full()
1cos(t)\displaystyle \frac{1}{\cos\left(t\right)}

Partie b

6cc8c800-d3c3-4d5c-8b4f-abd190116da8s y1(t) = cos(t) y2(t) = sin(t) y3(t) = t*cos(t) y4(t) = t*sin(t)
W = (wronskian(y1(t),y2(t),y3(t),y4(t))(0)).simplify_full()
M=matrix([[y1(t),y2(t),y3(t),y4(t)], [diff(y1(t),t),diff(y2(t),t),diff(y3(t),t), diff(y4(t),t) ],[diff(y1(t),t,2), diff(y2(t),t,2), diff(y3(t),t,2), diff(y4(t),t,2)], [diff(y1(t),t,3), diff(y2(t),t,3), diff(y3(t),t,3), diff(y4(t),t,3)] ]) M
(cos(t)sin(t)tcos(t)tsin(t)sin(t)cos(t)tsin(t)+cos(t)tcos(t)+sin(t)cos(t)sin(t)tcos(t)2sin(t)tsin(t)+2cos(t)sin(t)cos(t)tsin(t)3cos(t)tcos(t)3sin(t))\displaystyle \left(\begin{array}{rrrr} \cos\left(t\right) & \sin\left(t\right) & t \cos\left(t\right) & t \sin\left(t\right) \\ -\sin\left(t\right) & \cos\left(t\right) & -t \sin\left(t\right) + \cos\left(t\right) & t \cos\left(t\right) + \sin\left(t\right) \\ -\cos\left(t\right) & -\sin\left(t\right) & -t \cos\left(t\right) - 2 \, \sin\left(t\right) & -t \sin\left(t\right) + 2 \, \cos\left(t\right) \\ \sin\left(t\right) & -\cos\left(t\right) & t \sin\left(t\right) - 3 \, \cos\left(t\right) & -t \cos\left(t\right) - 3 \, \sin\left(t\right) \end{array}\right)
G=vector([0,0,0,sin(t)]) G = G.column() matrix(G)
(000sin(t))\displaystyle \left(\begin{array}{r} 0 \\ 0 \\ 0 \\ \sin\left(t\right) \end{array}\right)
M1 = G.augment(M.matrix_from_columns([1,2,3])) (det(M1)/W)(t).simplify_full() u1(t) = integrate((det(M1)/W)(s),s,0,t) u1(t)
12tcos(t)sin(t)+12cos(t)212\displaystyle \frac{1}{2} \, t \cos\left(t\right) \sin\left(t\right) + \frac{1}{2} \, \cos\left(t\right)^{2} - \frac{1}{2}
18tcos(2t)14t+316sin(2t)\displaystyle -\frac{1}{8} \, t \cos\left(2 \, t\right) - \frac{1}{4} \, t + \frac{3}{16} \, \sin\left(2 \, t\right)
M2 = M.matrix_from_columns([0]).augment(G.augment(M.matrix_from_columns([2,3]))) #M2 #Enlever le commentaire pour voir la matrice (det(M2)/W)(t).simplify_full() u2(t) = integrate((det(M2)/W)(s),s,0,t) u2(t)
12tsin(t)2+12cos(t)sin(t)\displaystyle \frac{1}{2} \, t \sin\left(t\right)^{2} + \frac{1}{2} \, \cos\left(t\right) \sin\left(t\right)
18cos(t)4+18sin(t)4+18t218tsin(2t)116cos(2t)+316\displaystyle -\frac{1}{8} \, \cos\left(t\right)^{4} + \frac{1}{8} \, \sin\left(t\right)^{4} + \frac{1}{8} \, t^{2} - \frac{1}{8} \, t \sin\left(2 \, t\right) - \frac{1}{16} \, \cos\left(2 \, t\right) + \frac{3}{16}
M3 = M.matrix_from_columns([0,1]).augment(G.augment(M.matrix_from_columns([3]))) #M3 #Enlever le commentaire pour voir la matrice (det(M3)/W)(t).simplify_full() u3(t) = integrate((det(M3)/W)(s),s,0,t) u3(t)
12cos(t)sin(t)\displaystyle -\frac{1}{2} \, \cos\left(t\right) \sin\left(t\right)
18cos(t)418sin(t)418\displaystyle \frac{1}{8} \, \cos\left(t\right)^{4} - \frac{1}{8} \, \sin\left(t\right)^{4} - \frac{1}{8}
M4 = M.matrix_from_columns([0,1,2]).augment(G) #M4 #Enlever le commentaire pour voir la matrice (det(M4)/W)(t).simplify_full() u4(t) = integrate((det(M4)/W)(s),s,0,t)
12cos(t)212\displaystyle \frac{1}{2} \, \cos\left(t\right)^{2} - \frac{1}{2}
var("c1,c2,c3,c4") y(t) = c1*y1(t) + c2*y2(t) + c3*y3(t) +c4*y4(t) + u1(t)*y1(t) + u2(t) *y2(t) + u3(t)*y3(t) + u4(t)*y4(t) y(t).simplify_trig()
(c1\displaystyle c_{1}, c2\displaystyle c_{2}, c3\displaystyle c_{3}, c4\displaystyle c_{4})
18((8c33)t+8c1)cos(t)+18(8c4tt2+8c2+3)sin(t)\displaystyle \frac{1}{8} \, {\left({\left(8 \, c_{3} - 3\right)} t + 8 \, c_{1}\right)} \cos\left(t\right) + \frac{1}{8} \, {\left(8 \, c_{4} t - t^{2} + 8 \, c_{2} + 3\right)} \sin\left(t\right)
y(0)
c1\displaystyle c_{1}
z1(t) = diff(y(t),t).simplify_full() z1(0)
c2+c3\displaystyle c_{2} + c_{3}
z2(t) = diff(y(t),t,2).simplify_full() z2(0)
c1+2c4\displaystyle -c_{1} + 2 \, c_{4}
z3(t) = diff(y(t),t,3).simplify_full() z3(0)
c23c3\displaystyle -c_{2} - 3 \, c_{3}
solve([c1==2, c2+c3==0,-c1+2*c4==1,-c2-3*c3==-1],[c1,c2,c3,c4])
[[c1=2\displaystyle c_{1} = 2, c2=(12)\displaystyle c_{2} = \left(-\frac{1}{2}\right), c3=(12)\displaystyle c_{3} = \left(\frac{1}{2}\right), c4=(32)\displaystyle c_{4} = \left(\frac{3}{2}\right)]]

Question 5

x1(t) = e^(t/2)*(c1*cos(2*t)+ c2*sin(2*t)) x1(t)
(c1cos(2t)+c2sin(2t))e(12t)\displaystyle {\left(c_{1} \cos\left(2 \, t\right) + c_{2} \sin\left(2 \, t\right)\right)} e^{\left(\frac{1}{2} \, t\right)}
x2(t) = 1/2*(diff(x1(t),t) - 1/2*x1(t)) x2(t)
(c2cos(2t)c1sin(2t))e(12t)\displaystyle {\left(c_{2} \cos\left(2 \, t\right) - c_{1} \sin\left(2 \, t\right)\right)} e^{\left(\frac{1}{2} \, t\right)}
x1(0) x2(0)
c1\displaystyle c_{1}
c2\displaystyle c_{2}
c1=-2 c2=2 x1(t) = e^(t/2)*(c1*cos(2*t)+ c2*sin(2*t)) x2(t) = 1/2*(diff(x1(t),t) - 1/2*x1(t))
C = parametric_plot([x1(t),x2(t)], (t,-5,4), color="blue") var("x1,x2") Champ =plot_vector_field([0.5*x1+2*x2,-2*x1+0.5*x2],(x1,-15,15),(x2,-15,15), color="green") show(C+Champ, aspect_ratio=1, axes_labels=['$x_1$','$x_2$'])
(x1\displaystyle x_{1}, x2\displaystyle x_{2})
x1(t) = e^(t/2)*(c1*cos(2*t)+ c2*sin(2*t)) x2(t) = 1/2*(diff(x1(t),t) - 1/2*x1(t)) C1 = plot(x1(t),0,5, color="blue", legend_label="$x_1$") C2 = plot(x2(t),0,5, color="red", legend_label="$x_2$") show(C1 + C2, axes_labels=['$t$',' '])
9ee97812-8375-493f-9e4b-8cab1c1b3d1f fbe3ccf3-9c28-4def-ad00-7a42e292fcef ec739e6c-460c-48ef-81b9-f9fb5e41a9a9 67c5e4ed-562f-4431-a2aa-246cde52da67