Exercice 7
Ecrire un algorithme en Python Sympy qui permet de résoudre l'équation: x3 - x2 - 2x + 2
Solution
1 2 3 4 5 6 7 8 9 10 |
import sympy as sy x = sy.Symbol('x') # définir l'équation eq = sy.Eq(x**3 - x**2 -2*x + 2 , 0) # resoudre l'équation solution = sy.solve( eq ) print( solution ) # affiche: [1, -sqrt(2), sqrt(2)] |
Younes Derfoufi
CRMEF OUJDA
Acheter sur Très Facile !
-
Algorithmes Python illustrés avec de belles images
€ 43,00 Acheter le livre -
Répéteur WiFi,1200Mbps Dual Band 2.4G / 5G WiFi Amplifier,WiFi Signal Booster,2 Ports LAN ,4 Antennes,WiFi Extenders
€ 18,00 Acheter le produit -
Disque dur EMTEC SSD Interne X150 240 Go- Prix Abordable
€ 21,00 Acheter le produit
1 thought on “Solution Exercice 7: résoudre équation troisième degré avec Sympy Python”