## symbolic calculation takes too much time...

Hello,

I am doing symbolic calculations of multi-body kinematics which involves more than 40-degrees of freedom. I built a module that will construct initial kinematic calculations and it finshes fairly quicly, (about 20s). When I want to retrieve these calculations, stored as proprties of the module, it takes really a long time, we are talking more than 30min. It's strange because these calcualtions were already made during the initalization of the module, I am just retriving them for the purpose of writing the symbolic results to a file to later be used in Matlab as functions.

Thanks.

## Problem with solving an integral...

Hi guys,

I can not solve this integral with maple ! I really appreciate if someone can help me! Mathematical gives a solution in terms of hypergeometric function!

p^2 , m, \epsilon, D > 0 and i is imaginary number

Thanks 111.mw

## Why does printing fix my error message?...

I've got a really bizarre error. In my quite short code, if I do not have the print statement, I get the error message 'Error, (in fib_even_sum) illegal use of an object as a name'. If I do use the print statement, the code runs fine, albeit having printed an unnecessary zero.

Here's the code:

fib_even_sum := proc()::integer:

uses combinat:

local val := 0, n := 1, FN := 0:

#print(%);

while FN <= 4000000 do:

if type(FN,even) then:

val += FN:

else end if:

++n:

FN := fibonacci(n):

end do:

return val:

end proc:

fib_even_sum();

I can't see what would be making it behave like this; perhaps I'm missing something really obvious?

## How to extract the results and solve the releva...

Hello, everyone! The following results about r has many. I want to put the results together(assume they are equal to  zero) and solve them. So my questions are how to put the results together and solve them? Thank you very much! And have a good day!

restart; w:=1/(4*(exp(1/2)+exp(-1/2))+2*(exp(1/2)+exp(-1/2))^2): g1:=x->sum(a[i]*x^i,i=0..50): for j from 0 to 50 do r:=(1/2+w)*(g1(j+1)+g1(j))-w*(g1(j-1)+g1(j+2))-g1(2*j+1): end do

## Error during integration...

I was computing an integral (Running Maple 18 on Windows 10):

The classic lenght of arc Integral of sqrt(1+(dy/dx)^2) dx

In this case, the function was a cartesian circle (x-R)^2+y^2=R^2 isolated as y=sqrt(R^2-(x-R)^2)

When I do the integration, the result of the integral is not correct.
But if I change R for a, the result is correct. Why? This does not make any sense.

R wasn't assigned to any variable. The code was:

Good Integral

[>y:=expand(sqrt(a^2-(x-a)^2));
[>f:=expand(simplify(sqrt(1+diff(y,x)^2)));
[>S:=int(f,x)+K;

Wrong Integral

[>y:=expand(sqrt(R^2-(x-R)^2));
[>f:=expand(simplify(sqrt(1+diff(y,x)^2)));
[>S:=int(f,x)+K;

In fact, any UPPERCASE letter used as the radius gives me the wrong answer whereas any LOWERCASE letter gives me the proper result. Why is this?

Thanks and have a nice day ## two vectors as output of proc ...

Dear all

I have a proc I would like to construct two vectors as output of  the proposed proc, the following code, contains  an example to illustrate this idea,

output_pro.mw

thanks for any help

## poinplot maple to plot many points same curve...

Dear all

I have many points, and I would like to use pointplot to hold all plots in the same curve.

plot_many_points.mw

thanks for any help

## plot table defined by elements inside loop ...

dear all

I have a three lines of codes, used to create vectors, I would like to put these vectors in two columns and each columns has a title.

simple_code_table.mw

thank you

## How to make the best use of known C libraries of g...

I am trying to calculate the number of  complete subgraphs K4 of a graph. Based on some similar discussions, like following links,

I wrote the following codes:

NumberOfK4:=proc(g::Graph)
local  n,N, i, j, k,l, g1,G1;
uses GraphTheory;
n:=NumberOfVertices(g);
g1 := RelabelVertices(g, [\$ i = 1..n]):
N:=0:
for i from 1 to n-3 do
for j from i+1 to n-2 do
for k from j+1 to n-1 do
for l from k+1 to n do
G1:=InducedSubgraph(g1,[i,j,k,l]);
if NumberOfEdges(G1)=6 then N:=N+1; fi;
od;
od;
od;
od;
N;
end proc:
with(GraphTheory): with(SpecialGraphs):
g:=CompleteGraph(5);
g1:=LineGraph(g);
NumberOfK4(g1)


5

I know the above codes are supposed to be inefficient in terms of speed. We want to improve this codes. One way I know  that is to take advantage of  the efficient graph theory programs such as igraph

Recently I learned how Maple calls external C programs.

The define_external command links in an externally defined function (for example, from a DLL under Windows, or from a shared library under UNIX), and produces a Maple procedure that acts as an interface to this external function.

From the help documentation, we need to compile the DLL files from the  source of C language. If it is a C program that does not need additional libraries, we can compile successfully, such as help documents

    void mat_mult( double *A, double *B, double *C, int I, int J, int K )
{
int i, j, k;
double t;
for( i = 0; i < I; ++i )
for( k = 0; k < K; ++k ) {
t = 0.0;
for( j = 0; j < J; ++j )
t += A[i*J+j] * B[j*K+k];
C[i*K+k] = t;
}
}


No offense, maple has relatively few functions on graph theory so far, while Sage has a strong advantage because of its ability to integrate open network resources. I think sage is considered better for graph theory researchers because of this.

I don't know if Maple has any guidance on integrating a publicly available  graph theory library ,such as igraph .

Where is the difficulty of using the written source code？ And my computer system is Windows 10 , are there any special requirements. If Maple does this better, it might be a wonderful thing for graph theorists.

## Convolution using FFT...

Hi

My integrals are convolutions.and I know I can evaluate this using numerical integration, but I am seeking a numerical solution of this problem using FFT. I have many many integrals of this type to evaluate and I need FFT for speed reasons.

fft.mw

This might inspire you.

## How to show equality of expressions with complex r...

I am searching for high level commands or techniques to show equality of expressions containing square roots that can be complex as here In an ideal world is() with the right assumptions should show equality. However, in the attached example, I failed already with my manual skills.

What did I miss here?

Equality_of_exp_with_complex_roots.mw

## Stepwise regression using maple...

I have a data with one dependent variable Y say and 32 independent variables say X1,X2,X3,....

Now I need to find the best say, a linear fit with the role playing independent variables only choosen so that I get pvalue less and R^2 and adjusted R^2 more than 90%

Even if possible to write for a nonlinear fit too

How to do such a code

I have my data in Excel sheet which I need to import

## print result as matrix...

Dear all

I have the following code,

for i to 6 do
for j to i do
F[i, j] :=  g(i+1)/g(j);
end do;
end do;
How can display F as a full matrix

## How to extract values following solve() set...

Hi, I need a little help please.

I'm writing some code that involves using solve() to solve some simultaneous equations and the output set from solve() is as follows :

{c = 8/3, c = 10/3}

I would now like to used the values 8/3, -10/3 in another calulation. However, I don't know how to extract the values/loose the variable parts of the set (namely "c=" and "c="). Can anyone help please.

FYI - I can't use fsolve as my simultaneous equations contain an another unknown variable, which I need to preserve.

## missing plus and minus signs in output of Student:...

On my PC I can't see the plus and minus sign in the quotient expression when using Student:-Basics:-LongDivision.

Is this a know display issue and is there to correct it?

Windows 10, Maple 2021.2

 > interface(version); > restart;
 > A:=4*x^4; B:=3*x^2-60*x+36; Student:-Basics:-LongDivision(A,B,x); #NOTICE, no + sign shows in quotient   > rem(A,B,x); quo(A,B,x); #signs shows up here OK  >