Find intersections of two functions in Maple

22.8k Views Asked by At

I have two functions $f$ and $g$ defined as:

$c:=x^3+x^2+x$

$d:=20\sin x^2-5$

I am trying to find the intersections of these using Maple $16$. How would I do this?

3

There are 3 best solutions below

4
On

Here is the command

fsolve( x^3+x^2-x=20*sin(x^2)-5, x=0..2 );

If you give maple the above command you will get the answer

$$ 0.4960649664. $$

Still there are other points of intersection and its your job to find them.

9
On

I think you can use this command :

f := x^3+x^2+x = 0;

g := 20*sin*x^2-5 = 0;

fsolve({f, g});

enter image description here

0
On

The two expressions c and d intersect at the values of x for which their difference is zero. So you can compute the roots of c-d, or plot that.

For this example it happens that all the roots fall within the default ranges of the two commands (Roots and plot) used below. For other examples you might supply additional arguments to specify the range.

c := x^3+x^2-x:

d := 20*sin(x^2)-5:

Student:-Calculus1:-Roots(c-d, numeric);

   [-3.372171392, -3.196493666, -2.489209992, -1.704885557, 

     -0.5361086923, 0.4960649664, 1.614439567]

plot(c-d);

enter image description here