Use sympy's solve method to solve the following three problems.
(1) Find the root of the quadratic equation, $ x ^ 2 + 5x + 3 = 0 $. (2) Solve the cubic equation, $ 3x ^ 3 + 3x-5 = 0 $. Imaginary solution comes out. (3) Solve the two-dimensional simultaneous equations, $ x ^ 2 + y ^ 2 = 4, y = 2x + 1 $.
Example(1)
from sympy import *
x=Symbol('x') #letter'x'Is defined as the variable x
"""
equation: solve
Example: 2 * x **2 +5*x+3=Find the root of 0
"""
sol=solve(2 * x **2 +5*x+3, x) #Store the solution in sol
print(sol)
Example(2)
from sympy import *
x=Symbol('x') #letter'x'Is defined as the variable x
"""
equation: solve
Example: 2 * x **3 +3*x-5=Find the root of 0
"""
sol=solve(2 * x **3 +3*x-5, x)
print(sol)
example(3)
from sympy import *
x=Symbol('x') #letter'x'Is defined as the variable x
y=Symbol('y') #letter'x'Is defined as the variable x
"""
equation: solve
Simultaneous equations x**2+y**2=4, y=2x+Find the solution of 1
"""
b= solve ([x*2+y**2-4, y-2*x+1],[x,y]) #Solve simultaneous equations
print(b)
[(1/4 + sqrt(13)/4, -1/2 + sqrt(13)/2), (-sqrt(13)/4 + 1/4, -sqrt(13)/2 - 1/2)]