## Enforce non-trivial solutions when using dsolve...

Hello Everyone,

Firstly thank you for your help everyone with answering my other question yesterday, it really helped.
Today I present with yet another issue, which is dealing with solving differential equations using the dsolve-command.

I have written a script which is defining the differential equations, (some numbers), and the constraints. However when I let it solve using dsolve, I only get a very very trivial answer, meaning f(x) = 0.
of course this is a valid answer, but not one I can work with...
(Can I maybe give an additional information, e.g. the function type it is supposed to do this task? In the documentation there is information on setting it up as a series, but what about exponential equations?)

I have uploaded to script (very short), maybe someone knows where I went wrong?
Also, I am assuming that for solving a DE which involves a fourth order derivative I need exactly four boundary conditions, which I provided.
Things are also getting really wonky when I set Nxy to something non-zero... Then I get a solutions which involves a mysterious Z which never happened before and again all four C_x, which I assume resemble missing boundary conditions, reappear.

Any help would be fantastic! :)

Best Regards,

Lennart

 (1)

## Given a lagrangian in general relativity , how ca...

Given a lagrangian  in general relativity , how can I calculate equation of motion using euler lagrangian equation in maple software ?

the lagrangian is

`L = 1/2 g[mu,nu] diff(x[~mu], lambda) diff(x[~nu],lambda)`

here lambda is the affine parameter.  and the metric is

metric coordinate = (t,u,x,y)

## How to find all the free variables from LinearAlge...

This is the context: I call LinearAlgebra:-LinearSolve to solve system of linear equations. If there are infinite solutions, then Maple return the solution that has free variables, calling them using  _t[n] where can change each time and be different. It can also be _t0[n] and _t1[n] etc.. but these all are indexed variables.

I want to obtain a list of all these free variables in the resulting solution vector, so that later I can assign them some values.

But I do not know what can be. And how many of them there are. There could be _t[3] and _t[4] for example in the same solution vector.

Here is what I do now, where I just check for indexed type. This seems to work, since only _t[n] should be in the resulting solution if any.

```restart;
A:=Matrix([[0,1,-1],[-1,-2,2],[-1,-2,2]]):
v:=Vector([-1,1,1]):
sol := LinearAlgebra:-LinearSolve(A,v);

map(x->select(type,x,'indexed'),convert(sol,set))
```

I do not know how to tell it to look for all something that starts with  _t and also indexed type.

Is there a better way to obtain list of all _t[n] that LinearAlgebra:-LinearSolve could return? Will LinearAlgebra always return the free variables as indexed variables so I am sure the above will always work?  Do you see a problem with the above solution?

## how to convert a list or a set to expression seque...

It is annoying that some functions in Maple wants input like (a,b,c,.....) which represents numbers, and I am not able to find how to use such a function, because the list of numbers I have are in a list.

For example, ilcm and igcd.  This is not a good design. The input should have been a list or set, or vector, etc....

I wanted to find least common multiplier of a list of numbers. These numbers are allready in a list, since this is a result of a computation done earlier. Now I want to find ilcm of them.

How to use ilcm in this case? How to unpack them to make ilcm happy? In Mathematica there a special function to do this, called Sequence, which takes a list and unpack it to call function.

But I am not able to find one in Maple. There is no convert(list,exprseq).

Here is a MWE

```v:=[2,4,7];
ilcm( v ); #does not work, since ilcm does not accept a list```

The variable v above has to be in a list (or set, or vector). This is result from another computation. This is all done non-interactive.

So I am looking for some magic function to use it like this

```v:=[2,4,7];
ilcm( convert_to_expression_sequence(v) )```

Is there a way to unpack or convert list to expression sequence, so I can use ilcm?

This is my attempt. But I suspect there is a build-in way in Maple to do this which I have not found yet.

```restart;

convert_list_to_exprsequence:=proc(L::list)::exprseq;
local r:=NULL,item;

for item in L do
r:=r,item;
od;

return r;
end proc:

v:=[2,4,7];
ilcm(convert_list_to_exprsequence(v)); #now it works

#28

```

Maple 2020.1

## legend and text in a plot...

Sir can you please tell me how to mention the valve of parameters like Re and lambda on the graph with different colors like as shown in the attached figure. I want to show thee valve by using  command rather than editing menually.

## How can I solve two equations?...

How I can find the coefficient an, and bn according to the following solution?

the coefficients an and bn can be found by solving the
two linear equations that come from V = V[0] at eta=eta[0] and
V = V[1] at eta=eta[1], and comparing with following Eq in each
case.

Best

2.mw

## How to draw a graph?...

Need help to draw a graph between x and lambda, lambda should on the horizontal axis. it should look like the attached picture.

 >
 >
 (1)
 >
 (2)
 >
 >
 (3)
 >

 >
 >
 (1)
 >
 (2)
 >
 >
 (3)
 >

## how to plot the Profiles of optimal control functi...

I an unable to prot the optimal  control function and the controls individualy for the diterministic mathematical model with an two or more optimal control. May  any one can give me a sample program on it. Such us the following figure

You may give me direction even.

## Two colors dye the same Vertex of graph...

I'm thinking of better demonstrating the cartesian product of a graph.
With the help documentation, we can easily find the cartesian product of two graphs.

with(GraphTheory):
G := CycleGraph([v__1,v__2,v__3,v__4]);
H:=Graph({{u__1,u__2}}):
vertexcolor="navy",edgethickness=3]);
vertexcolor="Gold",edgethickness=3]);

GH:=CartesianProduct(G,H)
DrawGraph(GH,style=spring)

When I saw Wikipedia's demo diagram, https://en.wikipedia.org/wiki/Cartesian_product_of_graphs

I was fascinated,and I also wanted to visually reflect the nature of Cartesian product by doing different staining of vertices.
It is easy for me to dye the vertices in one color, but it is difficult for
two different colors .

## Applying fsolve to unknowns of type x(0)...

 > restart;
 > kernelopts(version);

This one works as expected:

 > solve({x + y = 5, x - y = 3});

This one fails:

 > solve({x(0) + y(0) = 5, x(0) - y(0) = 3});

That shouldn't fail.  According to ?solve,details, under the Description

heading, it says that the unknown may be a name or a function.  Note that

 > type(x(0), function);

so there seems to be a contradiction.  Nevertheless, there is a workaround:

 > solve({x(0) + y(0) = 5, x(0) - y(0) = 3}, {x(0), y(0)});

 >

Now try with fsolve().  This one works as expected:

 > fsolve({x + y = 5, x - y = 3});

This one fails:

 > fsolve({x(0) + y(0) = 5, x(0) - y(0) = 3});

But the previous workaround does not help:

 > fsolve({x(0) + y(0) = 5, x(0) - y(0) = 3}, {x(0), y(0)});

I can temporarily rename the variables to plain symbols, or perhaps

freeze/thaw them.  But is there a simpler workaround?

## A gamma puzzle awaiting an explanation...

Maple's gamma constant appears to misbehave.

 > restart;
 > kernelopts(version);

 > evalf(gamma);     # this one is expected

 > evalf(gamma(0));  # this one may be explained

 > evalf(gamma(1));  # how to explain this one?

Things get more puzzling.  Let's declare gamma as local:

 > local gamma:
 > evalf(gamma);     # this is good

 > evalf(gamma(0));  # expected an unevaluated  here!

 > evalf(gamma(1));  # expected an unevaluated  here!

## Prevent Maple from applying product rule for expon...

Is there a way to prevent Maple from applying the product rule for exponents? That is, keep x*x as it is instead of automatically simplifying it to x^2. Or, alternatively, is there a way to decompose x^2 as x*x?

## I understand this is asking for homework help but ...

Moving to online learning has proved difficult to get any real 1 on 1 time or with my teachers around this question, and the help I have got hasn't helped me as yet.

I understand that asking for homework help is probably frowned upon but I would appreciate any help, guidance or direction on how to answer the below in Maple2019.

The general formula for a plane in the 3D space is z = ax + by + c, where a, b, c are the parameters. Alice encodes three English words to three numbers by using the Maple command "text2num". She then set up a (3,4) secret sharing scheme with the idea of the Blakley method. The four shares are four planes given by:

z =   4x + 19y + 2515211725275120 (mod 2515211819051461)

z = 52x + 27y + 2515210613496048 (mod 2515211819051461)

z = 36x + 65y + 2515210981587340 (mod 2515211819051461)

z =   6x + 60y + 2515211676449260 (mod 2515211819051461).

Find the secret English words of Alice with Maple command

I'm absolutely hitting a wall. The most I have found in the word "you".

## Bug in modp1(('Rem')(...))...

Hi there.

It seems like a bug in modp1(('Rem')(...)) with large polynomials with large coefficients.

bug_rem.mw

It needs the file polys.m there:

https://dropmefiles.com/9fATR

File polys.m too big for this forum so I used dropmefiles.

Polys.m contain two polynomials x and f_t with large degrees: degree(f_t) = m = 50021, degree(x) = 2*m - 2 = 100040 and large coefficients up to 2^N, where N = ceil(m / 2)+2 = 25013.

I just compute rem(x,f_t) mod 2^N.

As you can see in the first part of doc bug_rem.mw I decreased coefficients of polynomials by additional mod 2^N (with Embed function), where N = floor(N / 2) = 12506. WIth these decreased polynomials and decreased N modp1(('Rem')(...)) function works well and use maximum about 2.5 Gb of RAM.

But in the second part of doc bug_rem.mw with original polynomials and N = 25013 modp1(('Rem')(...)) use maximum about 3.5 Gb of RAM and crash with error:

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

This is strange and looks like a bug considering that the test server has 48 Gb of RAM.

Is it a bug or modp1(('Rem')(...)) just need more than 48 Gb of RAM?

How many RAM it needs for this computation?

Thank you