1
$\begingroup$

Problem

The spacecurve of intersection between the surfaces $opp$ & $\alpha$ (above z=3) has to be found, i.e. the intersection of the blue and green surface, above the red pane (z=3).

Plots

3D Plot enter image description here

Details

$$opp: z=10e^{-x^2-\frac{1}{4}.y^2}$$ $$\alpha: z=2x+6$$

  • $x=t$
  • $z=2t+6$

equating them to eachother, to find y: $$10e^{-x^2-\frac{1}{4}.y^2}=2x+6$$ applying $ln$ on both sides $$y=\sqrt{-4(\frac{ln(2t+6)}{ln(10)}+t^2})$$ Spacecurve: $$r(t)=<t,\sqrt{-4(\frac{ln(2t+6)}{ln(10)}+t^2}),2t+6>$$

However, maple comes up with the following error:

Warning, unable to evaluate the function to numeric values in the region

Maple-code

restart;
assume(t,'real'):
curve := [t, sqrt((-ln(2*t+6)/ln(10)+t^2)*4), 2*t+6]:
with(plots):
spacecurve(curve,t=1..10);

What could be the problem?

$\endgroup$
10
  • $\begingroup$ Hint: What happens if $t = 1$ or $t = 2$? $\endgroup$
    – Kaster
    Jul 29, 2015 at 19:47
  • $\begingroup$ @Kaster, i get a complex value for the y. Does this mean i need to get the absolute value? $\endgroup$
    – gdm
    Jul 29, 2015 at 19:54
  • $\begingroup$ No, it means that you need to restrict values for $t$ so that all expressions have real values. $\endgroup$
    – Kaster
    Jul 29, 2015 at 19:55
  • $\begingroup$ @Kaster, I've restricted all expressions to real values. But i'm still getting the same warning. $\endgroup$
    – gdm
    Jul 29, 2015 at 20:22
  • $\begingroup$ How did you do that? Can you edit your question accordingly then? Because I still see that $t = 1..10$. You should get restriction on the $t$. $\endgroup$
    – Kaster
    Jul 30, 2015 at 0:08

2 Answers 2

3
$\begingroup$
restart:

opp := z = 10*exp(-x^2-y^2/4);

                           /  2   1  2\
                 z = 10 exp|-x  - - y |
                           \      4   /

alpha := z= 2*x -6;

                      z = 2 x - 6

eq := eval(z,opp)=eval(z,alpha);

                    /  2   1  2\          
              10 exp|-x  - - y | = 2 x - 6
                    \      4   /          

S := solve( eq, y );

                     (1/2)                        (1/2)
  /  2     /1     3\\          /  2     /1     3\\     
2 |-x  - ln|- x - -||     , -2 |-x  - ln|- x - -||     
  \        \5     5//          \        \5     5//     


plot([Re,Im](S[1]), x=2.999..3.001, color=[red,blue]);

enter image description here

The imaginary components of S[1] and S[2] are nonzero except within a tight range of x. See the blue curve above. We can find the upper value numerically (approximately).

high := fsolve(S[1],x);

                      3.000614777

Now we can form the spacecurve in two parts, Pc1 and Pc2 below.

Pc1 := plots:-spacecurve([x, S[1], eval(z,alpha)], x=3..high,
                         labels=[x,y,z], color=green):

Pc2 := plots:-spacecurve([x, S[2], eval(z,alpha)], x=3..high,
                         labels=[x,y,z], color=green):

Optionally, we can also display the two surfaces alongside the green spacecurve.

Poa := plot3d( [eval(z,opp), eval(z,alpha)],
               x=3..high, y=-12 .. 12, color=[gold,grey] ):

plots:-display( Poa, Pc1, Pc2, view=[default,default,0..0.0015]);

enter image description here

I used a restricted viewing range for y. You'd need to use higher working precision to get the y values with much greater absolute value. However,

limit( S[1], x=3, right );

                        infinity

limit( S[2], x=3, right );

                       -infinity

Note also that there is a dedicated command, plots:-intersectplot, for plotting the intersection of two surfaces in modern Maple.

Let's use it first without attempting hard to figure out a special range for x (or y).

restart:
opp := z = 10*exp(-x^2-y^2/4):
alpha := z= 2*x -6:

plots:-intersectplot(eval(z,opp), eval(z,alpha),
                     x=-12..12, y=-12..12, grid=50);

enter image description here

And now that we can restrict the range for x, to see the curve better,

plots:-intersectplot(eval(z,opp), eval(z,alpha),
                     x=2.999..3.001, y=-12..12, grid=50);

enter image description here

$\endgroup$
2
  • $\begingroup$ I'm very sorry, but I just saw that the alpha-pane is defined wrong in question. I kept using the wrong equations myself, the alpha-plane had to be $z=2x+6$ instead of $z=2x-6$. $\endgroup$
    – gdm
    Jul 30, 2015 at 21:04
  • $\begingroup$ Well, then re-do the computations, and notice that your now revised surfaces intersect in more than one way. You can also try it with the following, which you can also display with the actual surfaces. plots:-intersectplot(eval(z,opp),eval(z,alpha),x=-4..2,y=-12..12,grid=50) $\endgroup$
    – acer
    Jul 31, 2015 at 1:11
1
$\begingroup$

I used the methods provided by the answers to solve the plotting of the spacecurve.

restart;
with(plots):
opp := z = 10*exp(-x^2-y^2/4):
alpha := z= 2*x +6:

ySolutions:=solve(eq,y);
subs({x=t},[ySolutions]):
ySolutions:=%:
y1:=ySolutions[1]:
y2:=ySolutions[2]:

curve1:=[t,y1,2*t+6]:
curve2:=[t,y2,2*t+6]:

#other way to solve the equation for y:
S := solve( eq, y );
#Im-Re plot of S[1] to visualize the boundaries to search for zeros
plot([Re,Im](S[1]), x=-10..10, color=[red,blue]);

xLzero:=fsolve(S[1]=0,x,{x=-2..0});
                         -0.9422426330
xRzero:=fsolve(S[1]=0,x,{x=0..1});
                          0.5783829968
sc1:=spacecurve(curve1,t=xLzero..xRzero):
sc2:=spacecurve(curve2,t=xLzero..xRzero):
display([sc1,sc2]);

Im-Re plot of S(1)

Re-Im plot of S[1]

The Spacecurve

Spacecurve plot

$\endgroup$
1
  • $\begingroup$ @acer, I used the methods you provided to solve my problem. Thank you! $\endgroup$
    – gdm
    Jul 31, 2015 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .