Items tagged with line line Tagged Items Feed

Working on a code to create random lines. Here is the code: 

M:=1; N:=1500; R3:=rand(1..3): # M=lines, N=steps

for i from 1 to M do
   for j from 0 to N do
   if j=1 then X[i,1]:=1; Y[i,1]:=0;
    elif j>1 then
        if r=1 then X[i,j]:=2*X[i,j-1]-X[i,j-2]; Y[i,j]:=2*Y[i,j-1]-Y[i,j-2]
        elif r=2 then X[i,j]:=X[i,j-1]+Y[i,j-1]-Y[i,j-2]; Y[i,j]:=Y[i,j-1]-X[i,j-1]+X[i,j-2];
        elif r=3 then X[i,j]:=X[i,j-1]-Y[i,j-1]+Y[i,j-2]; Y[i,j]:=Y[i,j-1]+X[i,j-1]-X[i,j-2];
      end if;
    end if;
  end do:
end do:

Now the code works fine. But I don't want the lines to cross its own path. I want it to stop if R[i,j]=R[i,k] for any 0<k<i-2 for j=0..N. What I have so far is:

for i from 1 to M do
  for j from 1 to 40 do
    for k from 1 to j-2 do
     if R[i,j]=K[i,k] then x:=j; print(b[i]=j); break; end if;
     end do;
   end do;
end do;

Now it works aswell, but it doesn't stop when it hits the crossing point. I want it to stop so i get one b[i]=j per M. So I need it to break two for loops so that it goes through i M times and stops everytime it reaches a crossing point

How I can write a procedure in Maple that return a equation of line that passes of two points (a,f(a)) and (b,f(b)) on the curve y=f(x) and the final plot y=f(x) and secant line in the same screen?


I defined a line normally, but when I try plot this line in R3, appears a shape of a plane.

How can I plot only a line in a 3D window?

Line has coordinates x,y, e z.



Do the following equation solve by method of line(MOL) with this software?

du/dt=0.01 d^2u/dx^2





t=1,delta t=0.1,x=1,Nx=10

thank you

How can I plot a vertical line say x = a in Maple 15 worksheet?


AoA... I want to plot the following functions






in one coordinate having the line style and legend like attached file.


PhD (Scholar)
Department of Mathematics

how to add another line in this template of formula

use the expression template  

how to add another line like


thank you in advance for your help


I have a line integral and i want to calculate and graph this line integral.

The line integral comes from a physical problem, the integrand is good in the interval [0, 2*Pi] and the value of the integrand at zero = the value of the integrand at 2*Pi.

The problem is when i use the trapizidal rule to calculate the line integral.

The results is so bad, i.e.  the value of the line integral at zero not equal to the value of the line integral at 2* Pi.

where is the problem.

Any one could help me.

One would expect that hitting F3 will split from _end_ of the current line (where the cursor is at).

But what Maple does is actually split everything from the current cursor location. Which means if the cursor happened not to be exactly at the end of the line, the current line itself will also be split and broken.

It is much more logical to split starting from end of current _line_ (where the cursor is at), not current character, because that is what normally one would want to do. One will have large block of code, and want to split it from one line down to the end.  It is a simple usability issue, which Maple UI seems to suffer allot from.

Is there a way to modify this behavior? I keep hitting F3 and forget to move the cursor to the end of the line before, and end up wasting time having to fix things afterwords since the line itself is split.



Hello Hello everybody 
   I have to solve the following differential equation numerically 




mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :


1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0



1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0



587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0



540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0


CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0


solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]




I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]


Help pleaase!

thank you !!!

Download systé


Hi, i'm wondering if theres anything i can do printf and print and have the outputs on the same line. I want the string wihtout any quotations so i think i can only do printf to get this, but then i'm putting an entry out of an array after this. This is a small example out of my code, i would like the output to be all on one line:

The synchronising vector is (S[j-1]) The synchronising word is (X[j-1]) The length of the synchronising word is ...


if (sync=true) then 
printf("The Synchronising vector is"); print(S[j-1]);
printf("The sychronising word is");
printf("The length of the synchronising word is");
else printf("There is no synchronising word"); 
end if;

 At the moment its outputing each print on a new line.

Any help would be much appreciated, thanks.


Hello Maple users friends,

I have two lines in the space (x,y,z) described by the equations in L1 and L2:


L1:= {4*x + 3*y + z = 0, x + y - z - 15 = 0}:

L2:={12*x + 5*y + 7*z -13 = 0, 9*x + y -3*z - 5 = 0}:

I would like the get the parametric (with z=t) equations P1 and P2 of the two lines..

I see the "form" of such parametric equations P1 and P2 using "solve"

solve(L1, {x, y}); solve(L2, {x,y});


but I do not know how to use those values to get my parametric equations P1 and P2 to continue with additional computation (area, volume etc).

Thanks for your attention and help.


Is it possible to display each element of a sequence on a new line?

The default behaviour, obviously, is to display each element on the same line separated by commas, and wrapping to a new line as required by screen space. This is somewhat unsightly when the elements of the sequence contain long equations or expressions, and impacts readability because the commas don't stand out as effective separators between elements.

For example:

B := b=2;

C := c=3;

A := B,C;


b=2, c=3


Is there a way to display each element on a new line?

For example:





Is there another data type or a simple expression that could achieve this effect?

Is it possible to show using maple if a given line in 3d space intersects a 2d plane with given co-ordinal vertices?

Hello everyone, i would like to make a graph to show the where the 2 funtions meet. I have already made the calculation but i also wanna show it in a graph, please help. 





1 2 3 Page 1 of 3