tomleslie

4329 Reputation

10 Badges

9 years, 68 days

MaplePrimes Activity


These are replies submitted by tomleslie

@wswain 

Can only suggest that you upload here

  1. An example of the sort of (big) Excel file (,xls or .xlsx) you are dealing with
  2. A Maple workheet illustrating (a couple of) thetypical  calculations/selections you are trying to perform, hopefully including some sort of indication of the output format required

For both of the above, use the big green up-arrow in the Mapleprimes toolbar for file upload

From the description(s) which you have supplied, I think I'd be tempted to convert the Excel data to a Maple dataframe (particularly if your original file comes with row/column "headers"), and then subsequently use select() functions to extract any desired entries for further processing.

Obviously, without the data or detailed specification of the requirement, this is pure guesswork on my part!

@itsme 

what is wrong with my original response?? Two possibilities

  1. Input to be translated is not valid Mathematica code
  2. Output is not valid Maple code

Which is it?

@itsme 

mathematica's lprint version of the greek letters in this case - note that they are actually correctly interpreted.

These characters are not correctly interpreted - otherwise you wouldn't have a problem.

  1. Don't ask Maple to translate the output of Mathematica's lprint() command.
  2. Try asking Maple to translate Mathematica commands
  3. (2) above works. (1) above doesn't. What is difficult to understand?

@vv 
the ode system

sqrt(x) * y'(x) = 1,  y(0) = 0.

at x=0, reduces to

sqrt(0)*y'(x)|x=0=1, y(0) = 0

or

0*y'(x)|x=0=1, y(0)=0

Now precisely what value of the quantity y'(x)|x=0 makes this true?

@Rouben Rostamian

that by "hmp method" the OP actually means the "HPM method" or "homology-perturbation method". There have been several questions here on this subject in the past.

The OP can examine previous discussions on the topic by entering either 'HPM' or 'homology perturbation' in the Mapleprimes search box .

Failing that, then the specific problem should be supplied

You should post worksheets, not "pictures of worksheets"

A picture of a a worksheet in not executable: it is not editable. So no-one here can do anything but read it before making suggestions.

Now imagine how easier it would be if you posted something people could edit/execute! Maybe even make minor edits to eliminate errors and supply you with corrected code.

Think how beneficial this would be

And all you have to do is

  1. Save your worksheet
  2. Upload the workdheet using the big green up-arrow in the Mapleprimes toolbar
  3. Probably quicker than using your 'picture' tool and so much more useful for anyone responding here
  4. So why not do it this way?

 

that you are trying to generate Malfatti circles, then you might want to take a look at the attached which does the first few stages in the construction.NB this is incomplete

I am short of time now (and over the next couple of days) so this may not be completed for a while (even if it is what you want - which is just a wild guess)

#
# Initialize
#
  restart;

#
# Load some packages and use the interface(rtablesize=10)
# command, just to ensure that this worksheet will display
# OK on the MApleprimes website
#
  with(plots):
  with(geometry):
  interface(rtablesize=10):
#
# Start the real work by defining three points and using
# them to construct a triangle and its incircle
#
  point( A, [-1, 5]):
  point( B, [-7, -1]):
  point( C, [12, -1]):
  triangle(T, [A, B, C]):
  incircle(ic, T, `centername`=IC):
#
# Generate three sub-triangles whose vertexes
# are two of those in the original triangle,
# plus the centre of the incircle - so these
# three triangles have vertexes
#
#      [A, B, IC]
#      [A, C, IC]
#      [B, C, IC]
#
# And generate the incircles of these triangles
#
  triangle(T__AB, [A, B, IC]):
  triangle(T__AC, [A, C, IC]):
  triangle(T__BC, [B, C, IC]):
  incircle(i__AB, T__AB, `centername`=c__AB):
  incircle(i__AC, T__AC, `centername`=c__AC):
  incircle(i__BC, T__BC, `centername`=c__BC):
#
# Calculate the points where each of these
# subsidiary incircles "touches" the edge
# of the original triangle
#
# Name these as
#
# the point X is where incircle i__AB touches edge AB
# the point Y is where incircle i__BC touches edge BC
# the point Z is where incircle i__AC touches edge AC
#
  intersection(X, line(lAB, [A,B]), i__AB):
  intersection(Y, line(lBC, [B,C]), i__BC):
  intersection(Z, line(lAC, [A,C]), i__AC):
#
# Construct a diagram showing the triangle, the three
# sub- triangles, the inCircle of the original triangle,
# and the incircles of the sub-triangles (just because
# visualization always helps)
#
  d1:= draw( [ A(color=black,     symbol=solidcircle, symbolsize=12),
               B(color=black,     symbol=solidcircle, symbolsize=12),
               C(color=black,     symbol=solidcircle, symbolsize=12),
               X(color=green,     symbol=solidcircle, symbolsize=12),
               Y(color=green,     symbol=solidcircle, symbolsize=12),
               Z(color=green,     symbol=solidcircle, symbolsize=12),
               IC(color=black,    symbol=solidcircle, symbolsize=12),
               c__AB(color=black, symbol=solidcircle, symbolsize=8),
               c__AC(color=black, symbol=solidcircle, symbolsize=8),
               c__BC(color=black, symbol=solidcircle, symbolsize=8),
               T(color=blue),
               T__AB(color=cyan,  linestyle=dot,      thickness=4),
               T__AC(color=cyan,  linestyle=dot,      thickness=4),
               T__BC(color=cyan,  linestyle=dot,      thickness=4),
               ic(color=red,      linestyle=dot,      thickness=4),
               i__AB(color=green),
               i__AC(color=green),
               i__BC(color=green)
             ],
             scaling=constrained,
             axes=none,
             size=[1200,1200]
           ):
#
# Produce some text annotations for the diagram
#
  t1:= textplot( [ [coordinates(A)[], "A"],
                   [coordinates(B)[], "B"],
                   [coordinates(C)[], "C"],
                   [coordinates(X)[], "X"],
                   [coordinates(Y)[], "Y"],
                   [coordinates(Z)[], "Z"],
                   [ coordinates(IC)[],    convert(`IC`, string)    ],
                   [ coordinates(c__AB)[], convert(`c__AB`, string) ],
                   [ coordinates(c__AC)[], convert(`c__AC`, string) ],
                   [ coordinates(c__BC)[], convert(`c__BC`, string) ]
                 ],
                 font=[times, roman, 20], align=above
               ):
#
# Display the diagram with the annotations, just to see
# where we are at
#
# There is still a long way to go in order to generate
# Malfatti circles!
#
  display([t1, d1]);

 

 


 

Download malf.mw

 

@JAMET 

and most obvious problem. You cannot define A as a list of two integrera, and then expect to use A as the name of a point!!

I have highlighted in red these conflicting  declarations in your code which is copied below.

There are probably many other errors

In future please upload code using the big green up-arrow in the MaplePrimes toolbar: this makes it immediately editable and executable. Uploading in plaintext means that responders have to be able to distinguish between Maple input and Maple output and remove all of the latter before execution. This is just very very tedious (and potentially prone to error)

As a wild guess - are you trying to produce something like Malfatti circles???

restart;
#Construction de 3 cercles tangents entre-eux et aux côtés d'un triangle
#a, b et c sont les 3 côtés, A,B et C les 3 sommets Ag, Bg, Cg les 3 angles, r1, r2 r3 les rayons des cercles

 

 

 


#A1A2=x, B1B2=y, C1C2=z, x²=4r1*r2, y²=4*r1r3, z²=4r1r2, r1=yz/2xn r2=xz/2y, r3=xy/2z

 


with(plots);
;
A := [-1, 5]; B := [-7, -1]; C := [12, -1];
a := sqrt((B[1]-C[1])^2+(B[2]-C[2])^2); b := sqrt((A[1]-C[1])^2+(A[2]-C[2])^2); c := sqrt((B[1]-A[1])^2+(B[2]-A[2])^2);
                            a := 19
                                 (1/2)
                         b := 205     
                                 (1/2)
                         c := 6 2     
p := 1/2*(a+b+c); Aire := sqrt(p*(p-a)*(p-b)*(p-c)); r := evalf(Aire/p);
                     19   1    (1/2)      (1/2)
                p := -- + - 205      + 3 2     
                     2    2                    
                        r := 2.727070319
Ag := arccos((-a^2+b^2+c^2)/(2*b*c)); Bg := arccos((a^2-b^2+c^2)/(2*a*c)); Cg := arccos((a^2+b^2-c^2)/(2*a*b)); verif := evalf(Ag+Bg+Cg);
                              / 7     (1/2)  (1/2)\
             Ag := Pi - arccos|--- 205      2     |
                              \410                /
                                 1   
                           Bg := - Pi
                                 4   
                               /13     (1/2)\
                   Cg := arccos|--- 205     |
                               \205         /
                      verif := 3.141592655

 

#Calcul des rayons des 3 cercles
r1 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Ag)));
                       r1 := 1.190796377
r2 := evalf((1/2)*r*(1+tan((1/4)*Ag))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Bg)));
                       r2 := 1.918607660
r3 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Ag))/(1+tan((1/4)*Cg)));
                       r3 := 2.244243923
xI := evalf((a*A[1]+b*B[1]+c . C[1])/(2*p)); yI := evalf((a*A[2]+b*B[2]+c . C[2])/(2*p));
                      xI := -0.4162698432
                       yI := 1.727070322
 interface(rtablesize = 10);
  kernelopts(version);
  Physics:-Version();
  with(geometry):
  with(plots):
  S := segment:
  L := line:
  Per := PerpendicularLine:
  R := 5: xA := 0: yA := 0:
  point(A, xA, yA):
  xI := (1/3)*R:
  yI := 0:
  point(I1, xI, yI):
  circle(C, [A, R]):
  quadri := proc (t)
                  local xM, yM, xN, yN, xE, yE, dr1;
                  xM := evalf(R*cos(t));
                  yM := evalf(R*sin(t));
                  point(M, xM, yM);
                  L(lMI, [M, I1]);
                  intersection('h', C, lMI, [M, N]);
                  L(lAM, [A, M]);
                  L(lAN, [A, N]);
                  Per(lME, M, lAM);
                  Per(lNE, N, lAN);
                  intersection(E, lME, lNE);
                  S(sAM, [A, M]);
                  S(sAN, [A, N]);
                  S(sME, [M, E]);
                  S(sNE, [N, E]);
                  dr1 := draw({sME, sNE, lMI(color = blue), sAM(color = black), sAN(color = black)});
                  display({dr1})
            end proc:
  dr := draw({C}, view = [-6 .. 17, -10 .. 6]);
  display([dr, quadri(.7), quadri(1), quadri(1.2)], view = [-6 .. 17, -10 .. 6]);
  xA := -1;
  yA := 5;
  xB := -1; # Observation: yB is undefined but is used
            # later. Is this an issue?? I have included
            # a "random" value for yB in the next line here
  yB:= 2;
  xC := -7;
  yC := -1;
  _EnvHorizontalName := x;
  _EnvVerticalName := y;
  point(A, xA, yA);
  point(B, xB, yB);
  # point(C, C[1], C[2]); # C[1]and C[2] are undefined
                          # maybe you meant xC and yC
                          # I have changed this in the
                          # following
  point(C, xC, yC);
  coordinates(B);
  triangle(Tr, [A, B, C]);
  whattype(A); # type() generally takes two arguments
           # Maybe you intended to use whattype()??
#
# None of A[1], A[2]], [B[1], B[2]], [C[1], C[2]]
# are defined by the above code. No idea how you expect the
# following to work - Maybe you intended xA, yA, xB, yB, xC
# and yC????
#  
#  Po := pointplot([[A[1], A[2]], [B[1], B[2]], [C[1], C[2]], [xI, yI]],
#                   color = blue,
#                   axes = none,
#                   view = [-7 .. 12, -1 .. 5]
#                 );
  Po := pointplot([[xA, yA], [xB, yB], [xC, yC], [xI, yI]],
                   color = blue,
                   axes = normal,
                   symbol=solidcircle,
                   symbolsize=20,
                   view = [-7 .. 12, -1 .. 5]
                 );
                               10
  Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973
"D:\lib\update.mla", 2018, November 16, 9:40 hours, version in 

 

   the MapleCloud: unable to determine, version installed in 

 

   this computer: not installed
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-circle) wrong type of arguments
Error, (in geometry:-draw) unknown geometric object  [12, -1]
Error, (in geometry:-intersection) wrong type of arguments
                            xA := -1
                            yA := 5
                            xB := -1
                            yB := 2
                            xC := -7
                            yC := -1
                    _EnvHorizontalName := x
                     _EnvVerticalName := y
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-coordinates) wrong type of argument
Error, (in geometry:-triangle) wrong type of arguments
                              list

 

 

 

with(geometry);
point(A, A[1], A[2]);
Error, (in geometry:-point) the first argument is expected of type name
Examples
with(geometry);
point(B, 2, 0);
Error, (in geometry:-point) the first argument is expected of type name
form(B);
                              FAIL
coordinates(B);
Error, (in geometry:-coordinates) wrong type of argument
HorizontalCoord(B);
Error, (in geometry:-HorizontalCoord) wrong type of argument
VerticalCoord(B);
Error, (in geometry:-VerticalCoord) wrong type of argument
detail(B);
Error, (in geometry:-detail) unknown object:  -7

 

@JAMET 

I have copied your code below and highlighted in red one obvious problem -there may be many others!!

The problem - if you define A := [-1, 5] and then (about 20 lines later) attempt to define point(A, xA, yA) - what do you honestly expect to happen?

Do you believe (by some magic) that the point with coordinates xA, yA will be successfully defined with the name [-1, 5] - I mean really?

In future please upload worksheets using the big green up-arrow in the Mapleprimes toolbar. This will make them immediately executable and editable. I have better things to do than hack the 'plaintext' you are currently uploading in order to make it usable!

This code "looks" like it *might* be an attempt to generate the Malfatti circles for a triangle - is this the fundamentqal question? Because if it is, believe me, you have a lot of work to do

Following is OP's original code with statements causing the first problem highlighted

restart;
#Construction de 3 cercles tangents entre-eux et aux côtés d'un triangle
#a, b et c sont les 3 côtés, A,B et C les 3 sommets Ag, Bg, Cg les 3 angles, r1, r2 r3 les rayons des cercles

 

 

 


#A1A2=x, B1B2=y, C1C2=z, x²=4r1*r2, y²=4*r1r3, z²=4r1r2, r1=yz/2xn r2=xz/2y, r3=xy/2z

 


with(plots);
;
A := [-1, 5]; B := [-7, -1]; C := [12, -1];
a := sqrt((B[1]-C[1])^2+(B[2]-C[2])^2); b := sqrt((A[1]-C[1])^2+(A[2]-C[2])^2); c := sqrt((B[1]-A[1])^2+(B[2]-A[2])^2);
                            a := 19
                                 (1/2)
                         b := 205     
                                 (1/2)
                         c := 6 2     
p := 1/2*(a+b+c); Aire := sqrt(p*(p-a)*(p-b)*(p-c)); r := evalf(Aire/p);
                     19   1    (1/2)      (1/2)
                p := -- + - 205      + 3 2     
                     2    2                    
                        r := 2.727070319
Ag := arccos((-a^2+b^2+c^2)/(2*b*c)); Bg := arccos((a^2-b^2+c^2)/(2*a*c)); Cg := arccos((a^2+b^2-c^2)/(2*a*b)); verif := evalf(Ag+Bg+Cg);
                              / 7     (1/2)  (1/2)\
             Ag := Pi - arccos|--- 205      2     |
                              \410                /
                                 1   
                           Bg := - Pi
                                 4   
                               /13     (1/2)\
                   Cg := arccos|--- 205     |
                               \205         /
                      verif := 3.141592655

 

#Calcul des rayons des 3 cercles
r1 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Ag)));
                       r1 := 1.190796377
r2 := evalf((1/2)*r*(1+tan((1/4)*Ag))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Bg)));
                       r2 := 1.918607660
r3 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Ag))/(1+tan((1/4)*Cg)));
                       r3 := 2.244243923
xI := evalf((a*A[1]+b*B[1]+c . C[1])/(2*p)); yI := evalf((a*A[2]+b*B[2]+c . C[2])/(2*p));
                      xI := -0.4162698432
                       yI := 1.727070322
 interface(rtablesize = 10);
  kernelopts(version);
  Physics:-Version();
  with(geometry):
  with(plots):
  S := segment:
  L := line:
  Per := PerpendicularLine:
  R := 5: xA := 0: yA := 0:
  point(A, xA, yA):
  xI := (1/3)*R:
  yI := 0:
  point(I1, xI, yI):
  circle(C, [A, R]):
  quadri := proc (t)
                  local xM, yM, xN, yN, xE, yE, dr1;
                  xM := evalf(R*cos(t));
                  yM := evalf(R*sin(t));
                  point(M, xM, yM);
                  L(lMI, [M, I1]);
                  intersection('h', C, lMI, [M, N]);
                  L(lAM, [A, M]);
                  L(lAN, [A, N]);
                  Per(lME, M, lAM);
                  Per(lNE, N, lAN);
                  intersection(E, lME, lNE);
                  S(sAM, [A, M]);
                  S(sAN, [A, N]);
                  S(sME, [M, E]);
                  S(sNE, [N, E]);
                  dr1 := draw({sME, sNE, lMI(color = blue), sAM(color = black), sAN(color = black)});
                  display({dr1})
            end proc:
  dr := draw({C}, view = [-6 .. 17, -10 .. 6]);
  display([dr, quadri(.7), quadri(1), quadri(1.2)], view = [-6 .. 17, -10 .. 6]);
  xA := -1;
  yA := 5;
  xB := -1; # Observation: yB is undefined but is used
            # later. Is this an issue?? I have included
            # a "random" value for yB in the next line here
  yB:= 2;
  xC := -7;
  yC := -1;
  _EnvHorizontalName := x;
  _EnvVerticalName := y;
  point(A, xA, yA);
  point(B, xB, yB);
  # point(C, C[1], C[2]); # C[1]and C[2] are undefined
                          # maybe you meant xC and yC
                          # I have changed this in the
                          # following
  point(C, xC, yC);
  coordinates(B);
  triangle(Tr, [A, B, C]);
  whattype(A); # type() generally takes two arguments
           # Maybe you intended to use whattype()??
#
# None of A[1], A[2]], [B[1], B[2]], [C[1], C[2]]
# are defined by the above code. No idea how you expect the
# following to work - Maybe you intended xA, yA, xB, yB, xC
# and yC????
#  
#  Po := pointplot([[A[1], A[2]], [B[1], B[2]], [C[1], C[2]], [xI, yI]],
#                   color = blue,
#                   axes = none,
#                   view = [-7 .. 12, -1 .. 5]
#                 );
  Po := pointplot([[xA, yA], [xB, yB], [xC, yC], [xI, yI]],
                   color = blue,
                   axes = normal,
                   symbol=solidcircle,
                   symbolsize=20,
                   view = [-7 .. 12, -1 .. 5]
                 );
                               10
  Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973
"D:\lib\update.mla", 2018, November 16, 9:40 hours, version in 

 

   the MapleCloud: unable to determine, version installed in 

 

   this computer: not installed
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-circle) wrong type of arguments
Error, (in geometry:-draw) unknown geometric object  [12, -1]
Error, (in geometry:-intersection) wrong type of arguments
                            xA := -1
                            yA := 5
                            xB := -1
                            yB := 2
                            xC := -7
                            yC := -1
                    _EnvHorizontalName := x
                     _EnvVerticalName := y
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-coordinates) wrong type of argument
Error, (in geometry:-triangle) wrong type of arguments
                              list

 

 

 

with(geometry);
point(A, A[1], A[2]);
Error, (in geometry:-point) the first argument is expected of type name
Examples
with(geometry);
point(B, 2, 0);
Error, (in geometry:-point) the first argument is expected of type name
form(B);
                              FAIL
coordinates(B);
Error, (in geometry:-coordinates) wrong type of argument
HorizontalCoord(B);
Error, (in geometry:-HorizontalCoord) wrong type of argument
VerticalCoord(B);
Error, (in geometry:-VerticalCoord) wrong type of argument
detail(B);
Error, (in geometry:-detail) unknown object:  -

 

@ahmadtalaei 

You have to be able to ask yourself the following questions (and provide sensible answers!)

  1. Is this PDE intended to represent some kind of more-or-less "real world" physical situation?
  2. Alternatively is the problem just some kind of purely mathematical construct with no bearing on "reality"? Bad news in this case! Assuming PDE has been correclty entered, it has no symmetry, cannot be seprated and a solution is "unlikely"
  3. On the other hand, if the PDE is supposed to represent a "real-world" physical situation, then does that situation have circular symmetry?
  4. If the problem has circular symmetry, then the solution function is (almost certainly?!) separable - which suggests that the PDE you are starting from is incorrectly formulated.
  5. Possibly if you specified the situation you are trying to address and let somone here construct the relevant PDE, progress might be made

@Rouben Rostamian  

a clever way to remove a boundary condition at infinity!

Although just defining "infinity" to be (say) 100 works equally well (if you are not a mathematical purist!)

@JAMET 

I have modified your worksheet by "guessing" what was intended. Amendments are highligted in "red" in the attached

In future, please upload worksheets using the big green up-arrow in the Mapleprimes toolbar. It will save responders the trouble of reformatting (for readability) and distinguisn between input code and output results (The latter have to be manually deleted from your posts, which is just tedious)

So check out the attached, which was developed/executed in Maple 2018

  restart:

  interface(rtablesize = 10);
  kernelopts(version);
  Physics:-Version();
  with(geometry):
  with(plots):
  S := segment:
  L := line:
  Per := PerpendicularLine:
  R := 5: xA := 0: yA := 0:
  point(A, xA, yA):
  xI := (1/3)*R:
  yI := 0:
  point(I1, xI, yI):
  circle(C, [A, R]):
  quadri := proc (t)
                  local xM, yM, xN, yN, xE, yE, dr1;
                  xM := evalf(R*cos(t));
                  yM := evalf(R*sin(t));
                  point(M, xM, yM);
                  L(lMI, [M, I1]);
                  intersection('h', C, lMI, [M, N]);
                  L(lAM, [A, M]);
                  L(lAN, [A, N]);
                  Per(lME, M, lAM);
                  Per(lNE, N, lAN);
                  intersection(E, lME, lNE);
                  S(sAM, [A, M]);
                  S(sAN, [A, N]);
                  S(sME, [M, E]);
                  S(sNE, [N, E]);
                  dr1 := draw({sME, sNE, lMI(color = blue), sAM(color = black), sAN(color = black)});
                  display({dr1})
            end proc:
  dr := draw({C}, view = [-6 .. 17, -10 .. 6]);
  display([dr, quadri(.7), quadri(1), quadri(1.2)], view = [-6 .. 17, -10 .. 6]);
  xA := -1;
  yA := 5;
  xB := -1; # Observation: yB is undefined but is used
            # later. Is this an issue?? I have included
            # a "random" value for yB in the next line here
  yB:= 2;
  xC := -7;
  yC := -1;
  _EnvHorizontalName := x;
  _EnvVerticalName := y;
  point(A, xA, yA);
  point(B, xB, yB);
  # point(C, C[1], C[2]); # C[1]and C[2] are undefined
                          # maybe you meant xC and yC
                          # I have changed this in the
                          # following
  point(C, xC, yC);
  coordinates(B);
  triangle(Tr, [A, B, C]);
  type(A); # type() generally takes two arguments
           # Maybe you intended to use whattype()??
#
# None of A[1], A[2]], [B[1], B[2]], [C[1], C[2]]
# are defined by the above code. No idea how you expect the
# following to work - Maybe you intended xA, yA, xB, yB, xC
# and yC????
#  
#  Po := pointplot([[A[1], A[2]], [B[1], B[2]], [C[1], C[2]], [xI, yI]],
#                   color = blue,
#                   axes = none,
#                   view = [-7 .. 12, -1 .. 5]
#                 );
  Po := pointplot([[xA, yA], [xB, yB], [xC, yC], [xI, yI]],
                   color = blue,
                   axes = boxed,
                   symbol=solidcircle,
                   symbolsize=20,
                   view = [-7 .. 12, -1 .. 5]
                 );

10

 

`Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973`

 

"C:\Users\TomLeslie\maple\toolbox\2018\Physics Updates\lib\Physics Updates.maple", `2019, March 14, 23:22 hours, version in the MapleCloud: 344, version installed in this computer: 326.`

 

 

 

-1

 

5

 

-1

 

2

 

-7

 

-1

 

x

 

y

 

A

 

B

 

C

 

[-1, 2]

 

Tr

 

false

 

 

 

Download geo2.mw

@mmcdara

  restart;

  interface(rtablesize=10):
#
# Using the  geometry package
#
  with(geometry):
  assume(R>0, r>0, d>0, x>0);
  interface(showassumed=0):
#
# Define the two circles
#
  circle( A,
          [ point( C__A, [0,0] ),
            R
          ]
        ):
  circle( B,
          [ point( C__B, [x, -R+d+r]),
            r
          ]
        ):
#
# When the two circles are tangent, the
# distance between the two centres is R+r
#
# Find the centre of the circle B, under
# this condition and return its coordinates
#
  ans1:= simplify~
         ( eval
           ( coordinates(C__B),
             x = solve
                 ( distance( C__A, C__B)=r+R,
                   x,
                   useassumptions
                 )
           )
         );
#
# Using similar triangles, find the
# coordinates of the tangent point
#
  ans2:=(R/(r+R))*~(ans1);
#
# Under the special condition that R=d+r,
# check the coordinates of the centre of
# of circle B, and the tangency point
#
  eval(ans1, d=R-r);
  eval(ans2, d=R-r);
  

[(d+2*r)^(1/2)*(-d+2*R)^(1/2), -R+d+r]

 

[R*(d+2*r)^(1/2)*(-d+2*R)^(1/2)/(r+R), R*(-R+d+r)/(r+R)]

 

[r+R, 0]

 

[R, 0]

(1)

 

Download circTan2.mw

@vv 

Consider the special case where the centres of both circles have the same y-value, so d+r=R.

Since the OP has requested that the centre of the circle A is at [0,0], then the above special case will have the tangent point will be at [R,0].

It's past my bedtime, by my money is on the attached

  restart;

  interface(rtablesize=10):

  x^2+(-R+d+r)^2=(R+r)^2:
  solve(%,x):
  u:=factor(%[1]):
#
# General solution
#
  R/(R+r)*<u, -R+d+r>;
#
# Check the case where R=d+r
#
  simplify(eval(%, d=R-r), symbolic);

Vector(2, {(1) = R*sqrt((d+2*r)*(-d+2*R))/(R+r), (2) = R*(-R+d+r)/(R+r)})

 

Vector[column](%id = 18446744074221674854)

(1)

 

 

Download circTan.mw

@minhthien2016 

When one fits data over a restricted range - then the only region over which the fit is guaranteed is that restricted range.

Expecting a fit "outside" the specified range is ridiculous!

1 2 3 4 5 6 7 Last Page 1 of 137