Equations différentielles

La méthode de la variation de la constante (3) - Exercice 1

50 min
75
Pour s'entrainer encore à la méthode de la variation de la constante.
Question 1
Résoudre les équations différentielles qui vous sont proposées.

Soit xx un nombre réel. Résoudre l'équation différentielle (E)(E) suivante : xy(x)+y(x)=exx \, y'(x) + y(x) = e^x.

Correction
Cette équation différentielle est linéaire, du premier ordre, à coefficients variables et avec second membre. On va donc considérer l'équation homogène associée, à savoir :
xyh(x)+yh(x)=0x \, y_h'(x) + y_h(x) = 0
Cette dernière est séparable. En effet elle peut s'écrire comme :
xdyhdx(x)+yh(x)=0dyhdx(x)=yh(x)xdyhdx(x)=1x1yh(x)x \, \dfrac{d \, y_h}{dx}(x) + y_h(x) = 0 \,\,\,\, \Longleftrightarrow \,\,\,\, \dfrac{d \, y_h}{dx}(x) = - \dfrac{y_h(x)}{x} \,\,\,\, \Longleftrightarrow \,\,\,\, \dfrac{d \, y_h}{dx}(x) = - \dfrac{\dfrac{1}{x}}{\dfrac{1}{y_h(x)}}
Ainsi, par l'écriture de LeibnizLeibniz on obtient :
1yh(x)dyh=1xdx\dfrac{1}{y_h(x)} dy_h = - \dfrac{1}{x} dx
En intégrant les deux membres, on trouve (avec CRC \in \mathbb{R}) que :
ln(yh(x))=ln(x)+C\ln(|y_h(x)|) = - \ln(|x|) + C
Ce qui implique que :
yh(x)=eln(x)+Cyh(x)=eln(1x)+Cyh(x)=eln(1x)eC|y_h(x)| = e^{- \ln(|x|) + C} \,\,\,\, \Longleftrightarrow \,\,\,\, |y_h(x)| = e^{\ln\left( \frac{1}{|x|}\right) + C} \,\,\,\, \Longleftrightarrow \,\,\,\, |y_h(x)| = e^{\ln\left( \frac{1}{|x|}\right) } \, e^{C}
Or, K=eCRK=e^{C} \in \mathbb{R}. Donc :
yh(x)=eln(1x)K|y_h(x)| = e^{\ln\left( \frac{1}{|x|}\right) } \, K
La valeur absolue est associée aux signes possibles. Donc on va écrire que :
yh(x)=±Kxy_h(x) = \dfrac{\pm K}{x}
Finalement, avec K=±KR\mathcal{K} = \pm K \in \mathbb{R}, on a :
yh(x)=Kx{\color{blue}{\boxed{y_h(x) = \dfrac{\mathcal{K}}{x}}}}
On va maintenant appliquer la méthode de la variation de la constante afin de déterminer une solution particulière ypy_p de l'équation (E)(E). Pour cela, on fait le changement KK(x)\mathcal{K} \longrightarrow\mathcal{K}(x). Ainsi, on pose :
yp(x)=K(x)xyp(x)=K(x)xK(x)x2y_p(x) = \dfrac{\mathcal{K}(x)}{x} \,\,\,\, \Longrightarrow \,\,\,\, y'_p(x) = \dfrac{\mathcal{K}'(x)}{x} - \dfrac{\mathcal{K}(x)}{x^2}
L'équation (E)(E) prend alors la forme :
xyp(x)+yp(x)=exx(K(x)xK(x)x2)+K(x)x=exx \, y_p'(x) + y_p(x) = e^x \,\,\,\, \Longleftrightarrow \,\,\,\, x \left( \dfrac{\mathcal{K}'(x)}{x} - \dfrac{\mathcal{K}(x)}{x^2} \right) + \dfrac{\mathcal{K}(x)}{x} = e^x.
Soit :
K(x)K(x)x+K(x)x=exK(x)=ex\mathcal{K}'(x) - \dfrac{\mathcal{K}(x)}{x} + \dfrac{\mathcal{K}(x)}{x} = e^x \,\,\,\, \Longleftrightarrow \,\,\,\, \mathcal{K}'(x) = e^x
En intégrant, on obtient :
K(x)=ex+q(qR)\mathcal{K}(x) = e^x + q \,\,\, (q \in \mathbb{R})
Ce qui nous permet d'obtenir :
yp(x)=exx+qx{\color{blue}{\boxed{y_p(x) = \dfrac{e^x}{x} + \dfrac{q}{x}}}}
Comme l'équation différentielle (E)(E) est linéaire, la solution globale yy est donnée par :
y(x)=yp(x)+yh(x)y(x) = y_p(x) + y_h(x)
Donc :
y(x)=exx+qx+Kxy(x) = \dfrac{e^x}{x} + \dfrac{q}{x} + \dfrac{\mathcal{K}}{x}
Ce qui nous donne :
y(x)=exx+q+Kxy(x) = \dfrac{e^x}{x} + \dfrac{q + \mathcal{K}}{x}
Finalement, en posant Q=q+KRQ = q + \mathcal{K} \in \mathbb{R}, on obtient :
y(x)=exx+Qx=1x(ex+Q){\color{red}{\boxed{y(x) = \dfrac{e^x}{x} + \dfrac{Q}{x} = \dfrac{1}{x} \left( e^x + Q \right) }}}
Question 2

Soit xx un nombre réel non nul. Résoudre l'équation différentielle (E)(E) suivante : y(x)+12xx2y(x)=1y'(x) + \dfrac{1 - 2x}{x^2} y(x) = 1.

Correction
Cette équation différentielle est linéaire, du premier ordre, à coefficients variables et avec second membre. On va donc considérer l'équation homogène associée, à savoir :
yh(x)+12xx2yh(x)=0y_h'(x) + \dfrac{1 - 2x}{x^2}y_h(x) = 0
Cette dernière est séparable. En effet elle peut s'écrire comme :
dyhdx(x)+12xx2yh(x)=0dyhdx(x)=12xx2yh(x)dyhdx(x)=2x1x2yh(x)\dfrac{d \, y_h}{dx}(x) + \dfrac{1 - 2x}{x^2}y_h(x) = 0 \,\,\,\, \Longleftrightarrow \,\,\,\, \dfrac{d \, y_h}{dx}(x) = - \dfrac{1 - 2x}{x^2}y_h(x) \,\,\,\, \Longleftrightarrow \,\,\,\, \dfrac{d \, y_h}{dx}(x) = \dfrac{2x-1}{x^2}y_h(x)
Ainsi, par l'écriture de LeibnizLeibniz on obtient :
1yh(x)dyh=2x1x2dx1yh(x)dyh=21xdx1x2dx\dfrac{1}{y_h(x)} dy_h = \dfrac{2x-1}{x^2} dx \,\,\,\, \Longleftrightarrow \,\,\,\, \dfrac{1}{y_h(x)} dy_h = 2\dfrac{1}{x} dx - \dfrac{1}{x^2} dx
En intégrant les deux membres, on trouve (avec CRC \in \mathbb{R}) que :
ln(yh(x))=2ln(x)+1x+C\ln(|y_h(x)|) = 2 \ln(|x|) + \dfrac{1}{x} + C
Ce qui implique que :
yh(x)=e2ln(x)+1x+Cyh(x)=eln(x2)+1x+Cyh(x)=x2e1xeC|y_h(x)| = e^{2 \ln(|x|) + \frac{1}{x} + C} \,\,\,\, \Longleftrightarrow \,\,\,\, |y_h(x)| = e^{\ln(|x|^2) + \frac{1}{x} + C} \,\,\,\, \Longleftrightarrow \,\,\,\, |y_h(x)| = |x|^2 \, e^{\frac{1}{x}} \, e^{C}
Or, K=eCRK=e^{C} \in \mathbb{R}, et pour tout xx réel on a x2=x2|x|^2 = x^2. Donc :
yh(x)=x2e1xK|y_h(x)| = x^2 \, e^{\frac{1}{x}} \, K
La valeur absolue est associée aux signes possibles. Donc on va écrire que :
yh(x)=±Kx2e1xy_h(x) = \pm K \, x^2 \, e^{\frac{1}{x}}
Finalement, avec K=±KR\mathcal{K} = \pm K \in \mathbb{R}, on a :
yh(x)=Kx2e1x{\color{blue}{\boxed{y_h(x) = \mathcal{K} x^2 \, e^{\frac{1}{x}} }}}
On va maintenant appliquer la méthode de la variation de la constante afin de déterminer une solution particulière ypy_p de l'équation (E)(E). Pour cela, on fait le changement KK(x)\mathcal{K} \longrightarrow\mathcal{K}(x). Ainsi, on pose :
yp(x)=K(x)x2e1xyp(x)=K(x)x2e1x+K(x)2xe1x+K(x)x21x2e1xy_p(x) = \mathcal{K}(x) \, x^2 \, e^{\frac{1}{x}} \,\,\,\, \Longrightarrow \,\,\,\, y'_p(x) = \mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} + \mathcal{K}(x) \, 2x \, e^{\frac{1}{x}} + \mathcal{K}(x) \, x^2 \, \dfrac{-1}{x^2} e^{\frac{1}{x}}
En simplifiant :
yp(x)=K(x)x2e1x+K(x)2xe1xK(x)e1xy'_p(x) = \mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} + \mathcal{K}(x) \, 2x \, e^{\frac{1}{x}} - \mathcal{K}(x) \, e^{\frac{1}{x}}
L'équation (E)(E) prend alors la forme :
K(x)x2e1x+K(x)2xe1xK(x)e1x+12xx2K(x)x2e1x=1\mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} + \mathcal{K}(x) \, 2x \, e^{\frac{1}{x}} - \mathcal{K}(x) \, e^{\frac{1}{x}} + \dfrac{1 - 2x}{x^2} \mathcal{K}(x) \, x^2 \, e^{\frac{1}{x}} = 1
En simplifiant :
K(x)x2e1x+K(x)2xe1xK(x)e1x+(12x)K(x)e1x=1\mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} + \mathcal{K}(x) \, 2x \, e^{\frac{1}{x}} - \mathcal{K}(x) \, e^{\frac{1}{x}} + (1 - 2x) \mathcal{K}(x) \, e^{\frac{1}{x}} = 1
En développant :
K(x)x2e1x+K(x)2xe1xK(x)e1x+K(x)e1x2xK(x)e1x=1\mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} + \mathcal{K}(x) \, 2x \, e^{\frac{1}{x}} - \mathcal{K}(x) \, e^{\frac{1}{x}} + \mathcal{K}(x) \, e^{\frac{1}{x}} - 2x\mathcal{K}(x) \, e^{\frac{1}{x}} = 1
Il reste alors l'égalité suivante :
K(x)x2e1x=1K(x)=1x2e1xK(x)=e1xx2K(x)=1x2e1x\mathcal{K}'(x) \, x^2 \, e^{\frac{1}{x}} = 1 \,\,\,\, \Longleftrightarrow \,\,\,\, \mathcal{K}'(x) = \dfrac{1}{x^2 \, e^{\frac{1}{x}}} \,\,\,\, \Longleftrightarrow \,\,\,\, \mathcal{K}'(x) = \dfrac{e^{-\frac{1}{x}}}{x^2} \,\,\,\, \Longleftrightarrow \,\,\,\, \mathcal{K}'(x) = \dfrac{1}{x^2} e^{-\frac{1}{x}}
En intégrant, on obtient :
K(x)=e1x+q(qR)\mathcal{K}(x) = e^{-\frac{1}{x}} + q \,\,\, (q \in \mathbb{R})
Ce qui nous permet d'obtenir :
yp(x)=(e1x+q)x2e1xyp(x)=x2+qx2e1xy_p(x) = \left( e^{-\frac{1}{x}} + q \right) \, x^2 \, e^{\frac{1}{x}} \,\,\,\, \Longleftrightarrow \,\,\,\, y_p(x) = x^2 + q \, x^2 \, e^{\frac{1}{x}}
Ce qui nous permet d'obtenir :
yp(x)=x2+qx2e1x{\color{blue}{\boxed{y_p(x) = x^2 + q \, x^2 \, e^{\frac{1}{x}}}}}
Comme l'équation différentielle (E)(E) est linéaire, la solution globale yy est donnée par :
y(x)=yp(x)+yh(x)y(x) = y_p(x) + y_h(x)
Donc :
y(x)=x2+qx2e1x+Kx2e1xy(x)=x2+(q+K)x2e1xy(x) = x^2 + q \, x^2 \, e^{\frac{1}{x}} + \mathcal{K} x^2 \, e^{\frac{1}{x}} \,\,\,\, \Longleftrightarrow \,\,\,\, y(x) = x^2 + (q + \mathcal{K}) x^2 \, e^{\frac{1}{x}}
En posant Q=q+KRQ = q + \mathcal{K} \in \mathbb{R}, on obtient :
y(x)=x2+Qx2e1xy(x) = x^2 + Q x^2 \, e^{\frac{1}{x}}
Finalement on obtient :
y(x)=x2(1+Qe1x){\color{red}{\boxed{y(x) = x^2 \left( 1 + Q \, e^{\frac{1}{x}} \right) }}}