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]);
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]);
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);
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);