## How do I let Maple work with the positive value's ...

Hi all,

I am working on a Maple file to find the right force excerted in a specifik angle (theta). This is the script Maple than has to work out:

eq4 := Fh1 = (1/2)*(solFh2*sqrt(2)-40)/sin(theta);
eq5 := Fh1 = (1/2)*(solFh2*sqrt(2)-100)/cos(theta);
sol := solve({eq4, eq5}, {Fh1, theta});

Next it gives me the answers as following:

sol := {Fh1 = 121.6477702, theta = .9606764638}, {Fh1 = -121.6477702, theta = -2.180916190}

Which is correct: I get a force (Fh1 = ± 121.6477...) with 2 angles (theta = .9696... or theta=-2.1809...)

If i want to continue working with Fh1 it gives an error saying it has 2 values for it (obviously a positive and a negative value). Is there a way to continue working with the positive values of Fh1 and theta?

I was thinking of solving the intersect equation on the positive 'theta'-axis in a form like:

sol := solve({eq4, eq5}, {Fh1, theta>0}); as theta is my horizontal axis and a positve theta gives me a positive Fh1 but Maple doesn't work that straightforward.

Thanks a lot!

## How to find equation of the intersection between ...

With the following command I can plot two spheres and plot them.

f1 := x^2+y^2+z^2 = 1

f2 := x+y+z = 1

with(plottools);

with(plots);

S1 := implicitplot3d(f1, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = blue, scaling = constrained, axes = boxed)

S2 := implicitplot3d(f2, x = -1 .. 1, y = -1 .. 1, z = -1 .. 1, style = patchnogrid, color = gold, scaling = constrained, axes = boxed)

dispaly(S1,S2)

My questions are:

1- How can I display (highlight) the circle which is the intersection between these two sphere on the same figure?

2- How can I find the equation of this circle?

Thank you.

## Intersection between three circles...

I want to calculate the intersection between three circles.
I know that in this case i can calculate intersection of only the first and second equation, but I need this for a interactive component.

The command "intersection"[GEOMETRY] work only with 2 circles.

I did this but it doesn't work.

Thanks.

## Intersection of datapoints with x-axis and area un...

Hello! with the datapoints below I've calulated the results "manually"
I'm looking for a way to make Maple tell me the intersection of these datapoints with the x-axis and also, the area under it from e.g. 0 to 5.125, which i've also had to calculate by hand... I know I can use int comand to do this, but I think there is a lot wrong with the syntax, so after hours of failure I hope someone can show me the right commands..

Thanks,
krismalo

 =       The intersection of this plot with the x-axis should be ≈ 5.125 and the area from 0 to 5.125 (or from 5.125 to 10) should be ≈ 13810

## how to find the intersection points of calabi yau ...

n := 5:
z1 := exp(2*3.14*I*k1/n)*cosh(z)^(2/n);
z2 := exp(2*3.14*I*k2/n)*sinh(z)^(2/n);
xx := Re(z1);
yy := Re(z2);
uu := cos(alpha)*Im(z1) + sin(alpha)*Im(z2);

i find that the 3d graph has many intersection points to itself

how to find these intersection points of calabi yau ?

## Intersection of two implicit plots...

hello

i have some implicit plot that i want intersect between them.

for example:

implicitplot(x^2+y^2<1,x=-3..3,y=-3..3);
implicitplot((x-1)^2+y^2<1,x=-3..3,y=-3..3);

how can i do intersect between them!?

thanks for guidance

## Geometry Intersection Fails...

intersection in the geometry package does not seem to recognize assume.

restart: with(geometry):

assume(p[1]<>0, p[2]<>0, p[3]<>0);
assume(q[1]<>0, q[2]<>0, q[3]<>0);
point(T,[p[1],q[1]]);
point(U,[p[2],q[2]]);
point(V,[p[3],q[3]]);
point(Op,[0,0]);

line(OT,[Op,T]);
line(OU,[Op,U]);
line(OV,[Op,V]);

point(B,2*q[2],solve(subs(x=2*q[2],Equation(OU)),y));
coordinates(B);
IsOnLine(B,OU);

eval(x,sol);
point(A,eval(x,sol),eval(y,sol));  ## the intersection exists

## Integer points in polyhedral regions

by: Maple 2015

This post is my attempt to answer the question from   here : how to find all integer points (all points with integer coordinates) in the intersection of two cubes. The following procedure  IntegerPoints  solves a more general problem: it finds all the integer points of a bounded polyhedral region of arbitrary dimension, defined by a system of linear inequalities and / or equations.

Required parameters of the procedure: SN is a set or a list of linear inequalities and/or equations with any number of variables, the Var is the list of variables. The procedure returns the set of all integer points, satisfying the conditions  SN .

Code of the procedure:

restart;

IntegerPoints := proc (SN::{list, set}, Var::list)

local SN1, sn, n, Sol, k, i, s, S, R;

uses PolyhedralSets, SolveTools[Inequality];

SN1 := convert(evalf(SN), fraction);

for sn in SN1 do

if type(sn, `<`) then SN1 := subs(sn = (`<=`(op(sn))), SN1)

end if; end do;

if IsBounded(PolyhedralSet(SN1)) = false then error "The region should be bounded" end if;

n := nops(Var);

Sol := LinearMultivariateSystem(SN, Var);

if Sol = {} then return {} else

k := 0;

for s in Sol do if nops(indets(s[1])) = 1 then

S[0] := [[]];

for i to n do

S[i] := [seq(seq([op(j1), op(j2)], j2 = [isolve(eval(s[i], j1))]), j1 = S[i-1])] end do;

k := k+1; R[k] := op(S[n]);

end if; end do;

convert(R, set);

map(t->rhs~(t), %);

end if;

end proc:

Examples of use:

IntegerPoints({x > 0, y > 0, z > 0, 2*x+3*y+z < 12}, [x, y, z]);

{[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 1, 4], [1, 1, 5], [1, 1, 6], [1, 2, 1], [1, 2, 2], [1, 2, 3], [2, 1, 1], [2, 1, 2],

[2, 1, 3], [2, 1, 4], [2, 2, 1], [3, 1, 1], [3, 1, 2]}

IntegerPoints({x > 0, y > 0, z > 0, 2*x+3*y+z = 12}, [x, y, z]);

{[1, 1, 7], [1, 2, 4], [1, 3, 1], [2, 1, 5], [2, 2, 2], [3, 1, 3], [4, 1, 1]}

IntegerPoints([x > 0, y > 0, z > 0, 2*x+3*y+z = 12, x+y+z <= 6], [x, y, z]);

{[1, 3, 1], [2, 2, 2], [4, 1, 1]}

isolve({x > 0, y > 0, z > 0, 2*x+3*y+z < 12});  #  isolve fails with these examples

Warning, solutions may have been lost

isolve({x > 0, y > 0, z > 0, 2*x+3*y+z = 12});

Warning, solutions may have been lost

In the following example (with a visualization) we find all integer point in the intersection of a square and a triangle:

S1 := {x > 0, y > 0, x < 13/2, y < 13/2}:

S2 := {y > (1/4)*x+1, y < 2*x, y+x < 12}:

S := IntegerPoints(`union`(S1, S2), [x, y]):

Region := plots[inequal](`union`(S1, S2), x = 0 .. 7, y = 0 .. 7, color = "LightGreen", nolines):

Points := plot([op(S)], style = point, color = red, symbol = solidcircle):

Square := plottools[curve]([[0, 0], [13/2, 0], [13/2, 13/2], [0, 13/2], [0, 0]], color = blue, thickness = 3):

Triangle := plottools[curve]([[4/7, 8/7], [4, 8], [44/5, 16/5], [4/7, 8/7]], color = blue, thickness = 3):

plots[display](Square, Triangle, Points, Region, scaling = constrained);

In the following example (with a visualization) we find all integer point in the intersection of two cubes. The second cube is obtained from the first cube by rotation with orthogonal matrix  A  and by a translation:

A := <1/3, 2/3, 2/3; -2/3, 2/3, -1/3; -2/3, -1/3, 2/3>:

f := unapply(A^(-1).<x+5, y-4, z-7>, x, y, z):

S1 := {x > 0, y > 0, z > 0, x < 6, y < 6, z < 6}:

S2 := eval(S1, {x = f(x, y, z)[1], y = f(x, y, z)[2], z = f(x, y, z)[3]}):

S := IntegerPoints(`union`(S1, S2), [x, y, z]);

Points := plots[pointplot3d](S, color = red, symbol = box):

Cube := plottools[cuboid]([0, 0, 0], [6, 6, 6], color = blue, linestyle = solid):

F := plottools[transform]((x, y, z)->convert(A.<x, y, z>+<-5, 4, 7>, list)):

plots[display](Cube,  F(Cube), Points, scaling = constrained, linestyle = solid, transparency = 0.7, orientation = [25, 75], axes = normal);

In the example below, all the ways to exchange \$ 1 coins of 1, 5, 10, 25 and 50 cents, if the number of coins no more than 8, there is no pennies and there is at least one 50-cent coin:

IntegerPoints({x1 = 0, x2 >= 0, x3 >= 0, x4 >= 0, x5 >= 1,  x1+5*x2+10*x3+25*x4+50*x5 = 100, x1+x2+x3+x4+x5 <= 8}, [x1, x2, x3, x4, x5]);

nops(%);

{[0, 0, 0, 0, 2], [0, 0, 0, 2, 1], [0, 0, 5, 0, 1], [0, 1, 2, 1, 1], [0, 2, 4, 0, 1],

[0, 3, 1, 1, 1], [0, 4, 3, 0, 1], [0, 5, 0, 1, 1]}

8

Integer_points.mw

Addition: Below in my comments another procedure  IntegerPoints1  is presented that solves the same problem.

## Apollonius (geometry) problem...

Hello,

I am trying to use Apollonius procedure from geometry package. Here is an example:

`restart;with(geometry): circle( c1, [ point( c1c, 0 , 0 ), 5 ] );circle( c2, [ point( c2c, 5 , 4 ), 2 ] );circle( c3, [ point( c3c, 13 , 0 ), 3 ] );A := Apollonius( c1, c2, c3 );`

Unfortunatelly the Apollonius method does not give any result. The only message is:

`intersection: there is no point of intersection`

Anyone know what is wrong in my code?

Best regards

Rafał Nowak

## Polynomial intersection error...

Hi, I'm new to Maple and have been trying to solve the below curve intersection. But the answer I am getting from Maple is incorrect and does not tally with the plot when drawn on excel, am I doing something wrong ???  (the intersect should be around x=93.9)

restart;
eq1:=y=86:
eq2:=y=-0.0000054527x^3+0.010903836x^2+0.0714244709x+74.18816:
sol:=solve({eq1,eq2},{x,y});

Hey there!

I uploaded a solid drawing from a CAD software (like solidworks, inventor, stl files, etc) into Maple using plottools:-importplot("drawing.stl").

Also, I know Maple can give me the normal vector (and point of intersection) using line and intersection commands, for example.

Now, is it possible to find a point of intersection (and the normal vector at that point) of a line that crosses the uploaded CAD solid?

I guess that to accomplish that, it would be necessary to somehow "map" the solid and that's the part that I am lost.

Many thanks!

## Intersection of surfaces.

by: Maple 15

Intersection of surfaces:

x3-.25*(sin(4*x1)+sin(3*x2+x3)+sin(2*x2))=0;  (1)

(x1-xx1)^4+(x2-xx2)^4+(x3-xx3)^4-1=0;          (2)

Surface (1) and a set of surfaces (2). Point (xx1, xx2, xx3) belongs to (1). Moving along the surface (1), we compute its intersection with the surface (2).
The program is very simple and its algorithm can be used for many other combinations of equations.

intersection_of_surfaces.mw

## how to calculate the residual of a curve...

a curve has residual p if it is linked, in a complete intersection, to a curve with residual p-1

0 residual if is a complete intersection of two surfaces

do complete intersection means two surfaces totally overlapped?

why they are not the same one if complete intersection?

## Show only the intersection between surfaces...

I Want to plot only the intersection between this Surfaces

z = sqrt(x^2+y^2)

y >= abs(x)

x^2+y^2+z^2 >= 4

x^2+y^2+z^2 <= 9

Anyone knows how ?

Thanks!

## Numerical solution of intersection of two curves o...

Hello I am a Maple 15 user and I am using the command fsolve to solve for the intersection of two curves over a specified interval in x, namely from 0 to the lim defined in the Maple document. The specified interval contains asymptotes and when I specify the full interval only one of the three solutions is returned even if I can see that there are three distinct solutions by looking at the plot of RHS and LHS. Should I use another technique to find the solution or is my implementation of fsolve command wrong?