Exercises
Solve and plot the following systems of equations
-
eq1:=sin(3x)-cos(x)=y
eq2:=y=0
plot({lhs(eq1), rhs(eq2)}, x=-10..10)
sols:=solve({eq1, eq2}, {x, y})
allvalues(sols[1])
allvalues(sols[2])
allvalues
fails so severalfsolve
commands are required to find the three roots in the plot.s1:=fsolve({eq1, eq2}, {x=0.1..1, y=-0.1..0.1}) s2:=fsolve({eq1, eq2}, {x=-1..-0.1, y=-0.1..0.1}) s3:=fsolve({eq1, eq2}, {x=-0.7..0.7, y=-0.1..0.1})
-
eq3:=x^5=y
eq4:=1+sin(x)=y
plot({lhs(eq3), lhs(eq4)}, x=-10..10, y=-10..10)
fsolve({eq3, eq4}, {x, y})
-
eq5:=y=x^2
eq6:=(y-1)^2=sin(x)
with(plots):
implicitplot({eq5, eq6}, x=-1..4, y=-1..3)
fsolve({eq5, eq6}, {x=0..1, y=0..0.5})
fsolve({eq5, eq6}, {x=1..2, y=1.5..3})