MaplePrimes Questions

G := GridGraph(3, 3);
 DrawGraph(G);

Now in place  of (1,3) i want label 1 , in place  of (2,3) i want label 2, in place  of (3,3) i want label 3, in place  of (1,2) i want label 4, in place  of (2,2) i want label 5,in place  of (3,2) i want label 6,in place  of (1,1) i want label 7,in place  of (2,1) i want label 8,in place  of (3,1) i want label 9

And i want the graph to straight like the above and the edges should be correct and strainght kind help

 

Similary for below

 

G := GridGraph(2, 3);
 
DrawGraph(G);

 

 

Now in place  of (1,3) i want label 1 , in place  of (2,3) i want label 2, in place  of (1,2) i want label 3, in place  of (2,2) i want label 4, in place  of (1,1) i want label 5, in place  of (2,1) i want label 6

 And i want the graph to straight like the above and the edges should be correct and strainght kind help 

 

Kind help in such vertex labeled graph outputs and graphs should be strainght with edges and presented

If i can get both in legacy mode the above all in the above form in the legacy mode it will be more good as i want the color etc like that in my output exactly

 

kind help  i apologize for the disturbance kind help please

Vertices should not have have any of the (1,1),(2,1) etc in the output it should be labeled with the vertex labels as told in that order

And the edges straingth and good.

 

kind help  i apologize for the disturbance kind help please

Hi to all! 

I have the following problem: I need to compute the Hilbert Polynomial of the polynomial ideal ((y-xn)*(y^2-xm)), where the variables are x and y while m and n are parameteres. So, i need the Hilbert Polynomial deending by n and m. Unfortunately i don't know how to "say" to Maple that it have to consider x and y as variabled and m and n as paramaters. Can i do this?

 

Thanks to all!

I like to show a domain as a roster of gridlines
The plotbuilder has not this option gridlines , so i must program this ?

How would you highlight specific numbers in a list?
For example, using
a:=[1,3,4,5,3,4,9,4,5,3,9,2,3,4,2,5,21,32,22,12,15,3,2,5,4]

Highlight all the 5's in the list to red for example like this

            

 

I have 2   equations that must be zero, and 2 ODE's for phi and theta

Vector(2, {(1) = `ϕ`(tau)-1.5*sin(`ϑ`(tau)), (2) = -`ϕ`(tau)^2+1.5*cos(`ϑ`(tau))})

how can i implement this quations with event statment .  this dose't work

 

event1 := [[`and`(gln[1], gln[2]), halt]]

 

 

A complicated programmed task for me
I must analyze this 

In this plot there are vertical  walls connected with the step area's , but that its not wanted.
Also the domain is showed by adding 0 in the plot 3d( {0, 'g(x,y)'}, ...) and this distract the plot with the step area's
Its not needed the domain in the plot ( in order to get the 0 value for z )     

The 3 axis x,y,z  are not visible in the plot 
Seems to be not complete programmed as it just to be.


 

restart

 

f:=proc(A,B,T,x,y)

     local n,m,i,j,val;

     n:=nops(A);m:=nops(B);

       for i from 1 to n-1 do

         for j from 1 to m-1 do

         if (A[i]<=x and x<A[i+1]) and

            (B[j]<=y and y< B[j+1]) then val:=T[i,j];

         end if;

          end do;

       end do;

     val;

   end proc:

 

 

A:=[0,1,2];B:=[0,1,2];T:=array([[1,2],[1.5,1]]);

A := [0, 1, 2]

 

B := [0, 1, 2]

 

array( 1 .. 2, 1 .. 2, [( 2, 1 ) = (1.5), ( 1, 1 ) = (1), ( 2, 2 ) = (1), ( 1, 2 ) = (2)  ] )

(1)

 

g:=(x,y)->f(A,B,T,x,y);

proc (x, y) options operator, arrow; f(A, B, T, x, y) end proc

(2)

 

plot3d({0,'g(x,y)'},x=0..2,y=0..2,axes=normal,
           scaling=constrained,orientation=[-37,75],
           projection=0.8,tickmarks=[3,0,2],
           shading=XYZ,lightmodel='light3');

 

 


 

Download texc_set_4_-task_3_-forumvraag.mw

 

 I want to find all real roots of   equation x^2 + floor(x) - 10=0

restart: 
solve(x^2+floor(x)-10,x) assuming x::real 

maple tells me:

  RootOf(_Z^2 + floor(_Z) - 10)

allvalues(%) 

RootOf(_Z^2 + floor(_Z) - 10, 2.828427125 + 0.*I)

even though  usRealDomain.

use RealDomain in  solve(x^2+floor(x)-10,x) end use

We get nothing!

So I trun to use fsolve.

plot(x^2+floor(x)-10,x=-5..5)

                                  

s:=fsolve(x^2+floor(x)-10,{x});
fsolve(x^2+floor(x)-10,x,avoid={s})

                     s := {x = 2.828427125}

                          -3.741657387

 

I try to use mathematica, it is good:

Solve[x^2 + Floor[x] - 10 == 0, x, Reals]

Could Maple  do that?

 

 

 

 

 

 

Hello,
In the same spirit of my previous question about converting a Mathapp to a GIF format, ( for educational goal)  Ideas?

Thanks

 

Fibonacci.mw

With showstat( )  i can see procedure body 
But it is also possible for tools : assistant, math apps, tutors and tasks ?

In library all proc are public.

I'm willing to draw phase portrait for the equation of ode fifth order

u'''''+6(u'u'''+(u'')^2)-u'''(a+2b)=0

where a and b are arbitrary constant not equal to zero and (') represents derivative w.r.t  'x'.

I'm getting no solution for the attached pdf.  Kindly suggest!

Maple Worksheet - Error

pde.mw

Hi dears

Just a simple question: I am trying to restore the coefficients of a polynomial in a vector, respect to a list of variables. For example

f:=a*u[]*u[1]*u[2]+b*u[1]*u[2]+c*v[]*v[1]*u[2]+d*u[]*v[1]*v[2]+d*u[]*v[1]*u[2]+f*u[]*v[];
    f := a u[] u[1] u[2] + c u[2] v[] v[1] + d u[] u[2] v[1] + d u[] v[1] v[2] + b u[1] u[2]+fu[]v[]
collect(f,{u[1],u[2],v[1],v[2]},distributed);
       (a u[] + b) u[1] u[2] + (c v[] + d u[]) u[2] v[1] + d u[] v[1] v[2]+fu[]v[]

 

in above example I intend to keep (a u[] + b) and (c v[] + d u[]) and d and fu[]v[] in a vector or a varieble. Is there any comments?

Thanks indeed in advence

Here in the above graph we are trying to find the longest distance between two vertices For example now say we consider vertices v_2 and v_4 in the above graph 

P_1 , P_2 ,P_3 are different possible path length in the above graph between v_2 and v_4  and it can be seen now the longest distance is 3 as it is the greatest among all lengths between v_2 and v_4

 

AllPathshortest only does the shortest path

 

can anyone help in the in general  finding the longest path between two vertices a graph if i give the

graph and the two vertices it should longest distance

here between v_2 and v_4 longest or greatest distance is 3 which should  greatest length of the several different paths between v_ 2 and v_4 itself

it should display that value.

kind help if anyone can

See the following code

restart;
u:=Vector(1);
u[1]:=1;
x1:=sum('u[i]^i','i'=1..1);
u[1]:=2;
x2:=sum('u[i]^(i)','i'=1..1);
x3:=sum('u[i]^(i+1)','i'=1..1);

When I run x1=1 and x2=1, but x3=4. But x2 should be 2. I presume this has something to do with the fact that when sum sees u[1] it already thinks it knows what u[1] is, but when it sees u[1]^2 it recalculates.  I realize that "add" would solve the problem here, but I thought for short sums sum called add. Suggestions?

 

 

First 531 532 533 534 535 536 537 Last Page 533 of 2428