tomleslie

13876 Reputation

20 Badges

15 years, 181 days

MaplePrimes Activity


These are replies submitted by tomleslie

@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!

@mmcdara 

"make a little mistake" I simply looked at the graph the OP wanted to fit and "eyeballed" a few obvious points through which the graph passed. I could have picked more points or fewer points - not relevant. The only only criterion is how well my solution fitted the desired graph.

The points which the OP selected to fit the graph - irrelevant. Could have picked more, fewer, different. Doesn't matter - just fit the desired graph

The points you choose to fit the graph - irrelevant. You seem to believe that the OP's selected points are important: not true. OP's objective is to fit the supplied graph - you get to select any points or fitting stategy you want. Just fit the supplied graph.

Lokk at the supplied graph and the "firs" which have been obtained. Only relevant question -who is closest!

send anything to my personal email

If you have a problem with any response I have posted here, then you specify it here

@pu397 

the "answer" which you want - but (unfortunately) not the question

I'm (normally) quite good at "guessing" what questioners might want. However the worksheet you originally uploaded just seems to be a pretty random bunch of execution groups with no logical structure, the outputs of which are often not used.

Forget worksheets: try to explain

  1. the problem
  2. the solution you are looking for

in simple English

I have attached a commented version of your worksheet - whic may explain just how confused I got whiloe trying to understand your objective

NULL

  restart;

#
# Why define a notation for displaying partial
# derivatives when nothing in this worksheet is
# ever differentiated???
#
  PDEtools[declare](f(x), prime = x);

` f`(x)*`will now be displayed as`*f

 

`derivatives with respect to`*x*`of functions of one variable will now be displayed with '`

(1)

  N:= 5;

5

(2)

#
# Is this meant to be a function definition
# ie, should it be
#
# f:=x->sum((p^(i))*v[i](x) , i=0..N);
#
# I suppose it doesn't matter very much since
# neither f() nor f(x) are actually used anywhere
#
  f(x):=sum((p^(i))*v[i](x) , i=0..N);

v[0](x)+p*v[1](x)+p^2*v[2](x)+p^3*v[3](x)+p^4*v[4](x)+p^5*v[5](x)

(3)

NULL

#
# This two-variable function will be immediately
# overwritten by the subsequent definition of the
# one-variable function in the next execution
# group - so why does it exist?
#
  v:= (t, x) -> p^3*v3 + p^2*v2 + pv1 + v0;

proc (t, x) options operator, arrow; p^3*v3+p^2*v2+pv1+v0 end proc

(4)

#
# This overwrites the previous definition of v().
# Should the term 'pv1t' actually be 'p*v1t' ???
#
  v:= t -> p^3*v3t + p^2*v2t + pv1t + v0t;

proc (t) options operator, arrow; p^3*v3t+p^2*v2t+pv1t+v0t end proc

(5)

#
# No idea what is intended by this execution group
# Luckily (as far as I can tell) nothing subsequently
# depends on it - so I can safely ignore it(?!)
#
  v(x $ 2) := v0(x $ 2) + pv1(x $ 2) + pv2(x $ 2) + pv3(x $ 2);

v0(x, x)+pv1(x, x)+pv2(x, x)+pv3(x, x)

(6)

#
# Is this meant to be a function definition?
# As given the left hand side is a simple 'name',
# not the function u(), supplied with arguments
# 0, t
#
  u(0, t) := 1 + cosh(2*x);

1+cosh(2*x)

(7)

#
# Since HMPEq is never subsequently used, why does
# this exist?
#
  HMPEq := (1 - p)*(v(t) - u(0, t)) + p*(v(t) + iv(x, x));

(1-p)*(p^3*v3t+p^2*v2t+pv1t+v0t-1-cosh(2*x))+p*(p^3*v3t+p^2*v2t+pv1t+v0t+iv(x, x))

(8)

NULL

#
# Since the output of the sort() command is not
# assigned to anything it cannot be used (I'm
# assuming OP does not understand use of '%')
#
# So why does this exist
#
  sort((1 - p)*(v(t) - u(0, t)) + p*(v(t) + iv(x, x)));

(p^3*v3t+p^2*v2t+pv1t+v0t+iv(x, x))*p+(-p+1)*(p^3*v3t+p^2*v2t+pv1t+v0t-cosh(2*x)-1)

(9)

#
# Restart everything - which deletes all of the above.
# The define an equation which isn't assigned to anything
# and therefore can be used (other than via '%', which
# OP doesn't use)
#
  restart;
  (1 - p)*(v(t) - u(0, t)) + p*(v(t) + iv(x, x));

(1-p)*(v(t)-u(0, t))+p*(v(t)+iv(x, x))

(10)

  N := 5;

5

(11)

#
# Define an equation which contains terms in p^0 and p^1
#
# Extract coefficients of p^0, p^1, p^2, p^3, p^4, p^5.
# the last four of which don't exist
#
  for i from 0 to N do
      equ[1][i] := coeff((1 - p)*(v(t) - u(0, t)) + p*(v(t) + iv(x, x)), p, i) = 0;
  end do;

v(t)-u(0, t) = 0

 

u(0, t)+iv(x, x) = 0

 

0 = 0

 

0 = 0

 

0 = 0

 

0 = 0

(12)

interface(rtablesize=10);

[10, 10]

(13)

NULL

NULL

NULL


Download whatIsThis.mw

Do you really think someone here is going to re-type all of these examples??

In the Mapleprimes toolbar there is a big green up-arrow. It is present so that you can upload Maple worksheets in editable/executable form

Use it!

@siddikmaple 

Your original post did not place any constraints on the solution.

If you want me to try again, then think very carefully about your problem and specify it exactly and completely. Otherwise you are just wasting my time

@Racine65 

but since you could not be bothered to upload actual code, and rely on my goodwill to retype everything, you have to expect errors. Requiring people on this site to retype your code without making errors is a pretty risky.

Hence I repeat my original comment

For future reference, you should upload code in editable/executable form using the big, green, up-arrow in the Mapleprimes toolbar rather than posting 'pictures' of code which have to be retyped.

Now which part of that comment don't you understand? And maybe now you realize why it is so much safer to upload editable/executable code.

For what it's worth, the attached shows the output with typo fixed

  restart;
  bezier2:= proc(p0, p1, p2, p3)
                 uses plots:
                 local z:
                 z:= (r, s)-> p0[s]*(1-r)^3+3*p1[s]*r*(1-r)^2+3*p2[s]*r^2*(1-r)+p3[s]*r^3:
                 spacecurve( [z(t,1), z(t,2), 0],
                             t=0..1,
                             axes=boxed,
                             color=blue
                           );
          end proc:
  bezier2( [2,5], [3,5,4], [3.5,1], [2,0]);

 

interface(rtablesize=10):

 

Download doPlot2.mw

 

yur equation is of degree 1 in t and degree 2 in x, you need three boundary/initial conditions for an explicit solution. You only have two

First 69 70 71 72 73 74 75 Last Page 71 of 207