float - Maple Help

solve/float

expressions involving floating-point numbers

 Calling Sequence solve(eqns, vars)

Parameters

 eqns - equations (as for solve), but with floating-point values vars - variables (as for solve)

Description

 • The solve function with floating-point numbers works by converting the floating-point numbers to approximate rationals, calling solve with these converted arguments, and converting the results back to floating-point numbers using evalf.
 • This can be convenient for solving equations with a combination of floating-point numbers and parameters (since fsolve will not solve equations with unassigned parameters).  In most cases, it is a better idea to convert the input into exact values manually since this will generally give more meaningful answers.

Examples

 > $\mathrm{eq}≔{x}^{2}-3x+0.01:$
 > $\mathrm{solve}\left(\mathrm{eq},x\right)$
 ${2.996662955}{,}{0.00333704529}$ (1)

This is equivalent to the following:

 > $\mathrm{eqe}≔\mathrm{convert}\left(\mathrm{eq},'\mathrm{rational}','\mathrm{exact}'\right)$
 ${\mathrm{eqe}}{≔}{{x}}^{{2}}{-}{3}{}{x}{+}\frac{{1}}{{100}}$ (2)
 > $\mathrm{sol}≔\mathrm{solve}\left(\mathrm{eqe},x\right)$
 ${\mathrm{sol}}{≔}\frac{{3}}{{2}}{+}\frac{{2}{}\sqrt{{14}}}{{5}}{,}\frac{{3}}{{2}}{-}\frac{{2}{}\sqrt{{14}}}{{5}}$ (3)
 > $\mathrm{evalf}\left(\mathrm{sol}\right)$
 ${2.996662955}{,}{0.003337045}$ (4)

The variable x is a parameter in the following example

 > $\mathrm{solve}\left(\left\{3.7y+z=\mathrm{sin}\left(x\right),{x}^{2}-y=z\right\},\left\{y,z\right\}\right)$
 $\left\{{y}{=}{-}{0.3703703704}{}{{x}}^{{2}}{+}{0.3703703704}{}{\mathrm{sin}}{}\left({x}\right){,}{z}{=}{1.370370370}{}{{x}}^{{2}}{-}{0.3703703704}{}{\mathrm{sin}}{}\left({x}\right)\right\}$ (5)
 > $\mathrm{fsolve}\left(\left\{3.7y+z=\mathrm{sin}\left(x\right),{x}^{2}-y=z\right\},\left\{y,z\right\}\right)$