# Math Help - Need help graphing with Maple

1. ## Need help graphing with Maple

Hi, I am having problems graphing something with Maple and was wondering if anyone could help me.

Here is the problem:

Let S be the region bounded by H(x)=10-2x, K(x)=(1/2xe^2x) -2x +3, by the vertical line x=2 on the left and by the point of intersection of H and K on the right. Let [a,b] be the interval over which S is defined.

Here is what I need to do:

Make a preliminary plot of the region explicitly showing the vertical line x=2 on the left side of the region.

I have tried to graph it like this: plot([H,K],-5..5);
I have not been able to get it to work and wonder if anyone might know what I am doing wrong. I had already defined what H and K were using arrow notation and set a to the appropriate value in an earlier step, in case that's important. Also, I am not sure what I should put where the
-5..5 is. Do you just have to guess what to put there or is there some way to figure that out? Thanks in advance to anyone who can help me.

2. Originally Posted by Matt164
Hi, I am having problems graphing something with Maple and was wondering if anyone could help me.

Here is the problem:

Let S be the region bounded by H(x)=10-2x, K(x)=(1/2xe^2x) -2x +3, by the vertical line x=2 on the left and by the point of intersection of H and K on the right. Let [a,b] be the interval over which S is defined.

Here is what I need to do:

Make a preliminary plot of the region explicitly showing the vertical line x=2 on the left side of the region.

I have tried to graph it like this: plot([H,K],-5..5);
I have not been able to get it to work and wonder if anyone might know what I am doing wrong. I had already defined what H and K were using arrow notation and set a to the appropriate value in an earlier step, in case that's important. Also, I am not sure what I should put where the
-5..5 is. Do you just have to guess what to put there or is there some way to figure that out? Thanks in advance to anyone who can help me.
you used the wrong brackets on the inside, i believe. and you forgot what variable to measure the range by. i suppose you want to do it by x. it should be:

plot({H(x),K(x)}, x=-5..5);

as for what range you should use, i think it is left to your discretion

3. Ok Thanks. I am able to get it to graph now. How do I make a plot showing the vertical line x=2 on the left side of the region? Do I need to type something else in? I can't figure out how to do that and would appreciate any help. Thanks in advance to anyone who can help me.

4. Originally Posted by Matt164
Ok Thanks. I am able to get it to graph now. How do I make a plot showing the vertical line x=2 on the left side of the region? Do I need to type something else in? I can't figure out how to do that and would appreciate any help. Thanks in advance to anyone who can help me.
just make the graphing range start at 2. instead of typing x=-5..5 type x=2..5 or whatever

5. Hmm.. I tried to change it to plot({H(x),K(x)}x=-2..5);
and got the following error: Warning unable to evaluate the functions to numeric values in the region; see the plotting commands help page to ensure the calling sequence is correct. Also, I misread the problem before and I should be making a plot of the region explicitly showing the vertical line x=-2, not x=2. Anyone have any idea what could be causing this
error?

Also I need to find b using fsolve for this same problem. I know I need to write something like b:=fsolve(H(x)=K(x),x=3..4.1); .I am not sure if I have set that up right, and I'm pretty sure that the x=3..4.1 doesn't belong, and something else should go there. Have I done this correctly? I am getting the same thing I typed out come back in blue, but the equal sign between the x and 3 has turned into a comma for some reason. Thanks in advance to anyone who can help me with either of these problems.

6. Originally Posted by Matt164
Hmm.. I tried to change it to plot({H(x),K(x)}x=-2..5);
and got the following error: Warning unable to evaluate the functions to numeric values in the region; see the plotting commands help page to ensure the calling sequence is correct. Also, I misread the problem before and I should be making a plot of the region explicitly showing the vertical line x=-2, not x=2. Anyone have any idea what could be causing this
error?
first of all, the way you defined your functions is sloppy. i am not even sure what k(x) is. if it is supposed to be $\frac 12xe^{2x} - 2x + 3$ you should define it as (1/2)*x*exp(2*x) - 2*x + 3 in Maple.

here is the code:

Code:
h:=x->10-2*x;

k:=x->(1/2)*x*exp(2*x) - 2*x + 3;

plot({h(x),k(x)},x=-2..2);

Also I need to find b using fsolve for this same problem. I know I need to write something like b:=fsolve(H(x)=K(x),x=3..4.1); .I am not sure if I have set that up right, and I'm pretty sure that the x=3..4.1 doesn't belong, and something else should go there. Have I done this correctly? I am getting the same thing I typed out come back in blue, but the equal sign between the x and 3 has turned into a comma for some reason. Thanks in advance to anyone who can help me with either of these problems.
Code:
fsolve(h(x)=k(x));
or
Code:
b:= fsolve(h(x)=k(x));
if you wish