## Application of MapleSim in Science and Engineering...

Application of MapleSim in Science and Engineering: a simulationbased approach

In this research work I show the methods of embedded components together with modeling and simulation carried out with Maple and MapleSim for the main areas of science and engineering (mathematics, physics, civil, mechanical etc); These two latest scientific softwares belonging to the company Maplesoft. Designed to be generated and used by teachers of education, as well as by university teachers and engineers; the results are highly optimal since the times saved in calculations are invested in analyzes and interpretations; among other benefits; in this way we can use our applications in the cloud since web technology supports Maple code with procedural and component syntax.

FAST_UNT_2020.pdf

Lenin AC

## Collocating a vector...

Hi User!

Hope you would be fine with everything. I have a vector "POL" of M dimension obatined for the following expression

restart; with(LinearAlgebra); nu := 1; M := 3;
for k while k <= M do
Poly[k] := simplify(sum(x^i*GAMMA(nu+1)/(factorial(i)*GAMMA(2*nu)), i = 0 .. k-1))
end do;
POL := <,>(seq(Poly[k], k = 1 .. M))

and I want to construct a matrix of M by M by collocating it on the points x=i/(M-1) for i=0,1,2,...,M-1 like the following way,

For M=3 I need

Matrix(3, 3, {(1, 1) = Poly[1](0), (1, 2) = Poly[1](1/2), (1, 3) = Poly[1](1), (2, 1) = Poly[2](0), (2, 2) = Poly[2](1/2), (2, 3) = Poly[2](1), (3, 1) = Poly[3](0), (3, 2) = Poly[3](1/2), (3, 3) = Poly[3](1)});

For M=4 I need

Matrix(4, 4, {(1, 1) = Poly[1](0), (1, 2) = Poly[1](1/3), (1, 3) = Poly[1](2/3), (1, 4) = Poly[1](1), (2, 1) = Poly[2](0), (2, 2) = Poly[2](1/3), (2, 3) = Poly[2](2/3), (2, 4) = Poly[2](1), (3, 1) = Poly[3](0), (3, 2) = Poly[3](1/3), (3, 3) = Poly[3](2/3), (3, 4) = Poly[3](1), (4, 1) = Poly[4](0), (4, 2) = Poly[4](1/3), (4, 3) = Poly[4](2/3), (4, 4) = Poly[4](1)})

and general form is like this

[[[Poly[1](0/(M-1)),Poly[1](1/(M-1)),Poly[1]((2)/(M-2)),...,Poly[1]((M-1)/(M-1))],[Poly[2](0/(M-1)),Poly[2]((1)/(M-1)),Poly[2]((2)/(M-1)),...,Poly[2]((M-1)/(M-1))],[Poly[3]((0)/(M-1)),Poly[3]((1)/(M-1)),Poly[3]((2)/(M-1)),...,Poly[3]((M-1)/(M-1))],[...,...,...,...,...],[Poly[M]((0)/(M-1)),Poly[M]((1)/(M-1)),Poly[M]((2)/(M-1)),...,Poly[M]((M-1)/(M-1))]]];

Another problem is I want to define a vector of M dimension using a function f(x)=sin(x) and two points a=1, b=2 like the following way,

Vec:=[[[a],[f((1)/(M-1))],[f((2)/(M-1))],[f((3)/(M-1))],[...],[f((M-1)/(M-1))],[b]]]
Special request @acer @acer @Carl Love @Kitonum @Preben Alsholm

## Simplification of an expression...

Dear Users!

Hope you would be fine with everything. I want the simpliest for of the following expression in two step:

diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z))+u[delta]*lambda[1]*(diff(U(X, Y, Z, tau), tau, tau))/L[delta]+u[delta]*lambda[1]*(diff(U(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), X))/L[delta]+u[delta]*lambda[1]*U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, X))/L[delta]+u[delta]*lambda[1]*(diff(V(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), Y))/L[delta]+u[delta]*lambda[1]*V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, Y))/L[delta]+u[delta]*lambda[1]*(diff(W(X, Y, Z, tau), tau))*(diff(U(X, Y, Z, tau), Z))/L[delta]+u[delta]*lambda[1]*W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), tau, Z))/L[delta];
Step 1:
diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z))+u[delta]*lambda[1]*(diff(diff(U(X, Y, Z, tau), tau)+U(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), X))+V(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Y))+W(X, Y, Z, tau)*(diff(U(X, Y, Z, tau), Z)), tau))/L[delta];
Step 2: (final form I need)
(1+(u[delta] lambda[1])/(L[delta]) (&PartialD;)/(&PartialD;tau)) ((&PartialD;)/(&PartialD;tau) U(X,Y,Z,tau)+U(X,Y,Z,tau) ((&PartialD;)/(&PartialD;X) U(X,Y,Z,tau))+V(X,Y,Z,tau) ((&PartialD;)/(&PartialD;Y) U(X,Y,Z,tau))+W(X,Y,Z,tau) ((&PartialD;)/(&PartialD;Z) U(X,Y,Z,tau)));
Special request:
@acer @Carl Love @Kitonum @Preben Alsholm

## Maple Inner product for Tensors ...

I'm fairly new to using Maple and am having a bit of a hard time calculating the following inner product. Firstly, I define the tensors (which to this end I'm not certain they are correctly defined),

with(Physics):

Setup(mathematicalnotation=true)

Setup(coordinatesystems=spherical):

ds2 := - dt^2 + a(t)^2 /( 1-k*r^2)*dr^2 + a(t)^2*r^2*dtheta^2 + a(t)^2*r^2*sin(theta)^2*dphi^2;
Setup(coordinates = spherical, metric = ds2);

e[mu, ~nu] = Matrix(4, {(1,1)= a(t)/sqrt(1-k*r^2), (2,2)=a(t)*r, (3,3)=a(t)*r*sin(theta), (4,4)=1}, fill=0); (15)
Define((15))
f[~mu, nu] = Matrix(4, {(1,1)=sqrt(1-k*r^2)/(a(t)), (2,2)= 1/(a(t)*r), (3,3)=1/(a(t)*r*sin(theta)), (4,4)=1}, fill=0); (28)

Define((28))


Thus, I defined two mixed tensors e[mu, ~nu] (one covariant and one contravariant index ) and f[~mu, nu] (one contravariant and one covariant index).

Then, I try to take the following inner product between the two mixed tensors and the Christoffel symbols of the second kind, namely,

e[nu, ~alpha].f[~sigma, beta].Christoffel [~nu, sigma, mu];

where I used the Physics['.'] command . However, when I try taking this inner product, it returns unevaluated.

Did I define the mixed tensors incorrectly? Does it matter how you define the indices when you're gonna take the inner product? Because taking the inner product of simply e[mu, ~nu].f[~mu, nu] also returns unevaluated. Also, I should mention that  e[mu, ~nu] and f[~mu, nu] are inverses of each other, is there any way to define one and get the other, since, simply changing the way in which the indices are raised and lowered doesn't take the reciprocal of the components.

## Maple gives solution to PDE which does not satisfy...

Do you agree this solution given by Maple is not correct?

restart;
pde := diff(u(x,t),t)+diff(u(x,t),x)=0;
bc  := D[1](u)(0,t)=0;
ic  := u(x,0)=exp(-x^2);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming x>0,t>0;
pdetest(sol,pde)


Result of pdetest should be zero.

I think the PDE itself is not well posed (I copied it from different forum to see what Maple does with it). But still the solution clearly does not satisfy the PDE itself for x not zero.

Maple 2019.2.1 with Physics version 573

## Maplesoft at Joint Math 2020 in Denver

by: Maple

The Joint Mathematics Meetings are taking place next week (January 1518) in Denver, CO. This meeting is a must-attend for anyone interested in learning about innovative mathematical research, advancing mathematical achievement, providing the communication and tools to progress in the field, encouraging mathematical research, and connecting with the mathematical community.

Maplesoft will at booth #1100  in the networking area (located just outside the exhibit hall doors). Stop by our booth or the networking area to chat with me and other members of the Maplesoft team, pick up some free Maplesoft swag or win some prizes. We’ve got some good ones!

There are also several interesting Maple-related talks and events happening this week.

Attend our Workshop - Maple: Math Software for Teaching, Learning and Research

Thursday January 16th, 2020

Catered Reception: 6:00PM6:30PM
Training Workshop: 6:30PM8:00PM

Are you new to the Maple world and interested in finding out what Maple can do for you? Are you an old hand at Maple but curious about the many new features we’ve added in the past few years? Come join us for an interactive workshop that will guide you through Maple’s capabilities, with an emphasis on our latest additions.

The topics we’ll be covering include:

• Our natural math notation for input and output
• Tools for creating interactive documents that incorporate math, text and graphics
• An overview of our vast library containing packages for advanced mathematics research scientific and engineering applications
• A brief look at Maple’s powerful programming language|
• Online and mobile tools that augment the Maple experience

Register herewww.com/

We are also 3 show floor talks, at the end of Aisle 600 inside the exhibits:

 The Maple Companion App January 15 3:00 pm -3:55 pm Using Maple to Enhance Teaching and Learning January 16 11:00 am-11:55 am The Maple Companion App January 17 11:00 am- 11:55 am

If you are attending the Joint Math Meetings and plan on presenting anything on Maple, please let me know and I'll add it to our list!

See you there!

Charlotte

## NLPSolver, non-numeric result encountered...

test.mw

NLPSolve('f(x,y,'g(x,y)')', x=0..1,y=0..1) is not working...

## for loop inside unapply...

How to use for loop inside unapply operator

## plot3d in Maple 2017 and 2019...

test.mw

I am not sure why I cannot do: plot3d([f(x,y,'g(x, y)')], x=0..1,y=0..1).

And the use of single quote in Maple 2019 and 2017 are giving different results. that is, the plot (note, not plot3d) results in the attched script by Maple 2017 and 2019 are different...

## sqp minimization methopd maple...

I want to know whether sqp method do a local search or a global search. Thank you.

## why I can't isolate the negative sign from odd rad...

I found that i can use  simplify under assumption to gain the result :

simplify((-p^3)^(1/3), assume = negative);
-p

simplify((p^3)^(1/3), assume = positive);
p

But confusing ! I expected the simplify command just with the option=symbolic works at the same manner ?

My purpose :

 >
 (1)
 >
 (2)

Without negative sign the simple symbolic result appears :

 >
 (3)

In power 3 the Imaginary part is included too !

 >
 (4)

NOT WORKING !

 >
 (5)
 >
 (6)
 >
 (7)
 >
 >

## I try to invert this Matrix and get error...

Way I get this error ?

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

## Compute sequences of functions easily...

I create a lot of procs and functions and then find myself having to create sequences of their values. I use for loops, seq or create a new proc to do it.

e.g., suppose I have a proc like f := n->n^2 or whatever. I can do [seq(f(k),k=0..5)]. Is there a very simple notation that maple has to do the same? E.g., hypopthetically f(0..5) and it handles the accumulation in to a sequence itself

## How to stop maple from rewriting equational form...

e.g., I have an equation that is written like a/b*c and maple rewrites it as a*c/b.

c is a complicated expression and when it's written with b under it, it takes up far more vertical spaces than necessary giving less visual resolution even if b is just 2.

In latex notation it is the difference between \frac{a}{b} c and \frac{ac}{b}.

In general what is the process? I noticed I can sometimes use   to block things in but this also interfers with mathamtical notation. e.g., 3^f becomes just that rather than f writen as a superscript.

Clearly I could hack it using various things but I want something direct and simple that tells maple not to try to do it's magic tricks.

For example, sometimes I might have 2*(a + b) and maple displays it as 2a + 2b. If I write it as 2*(a+b) then this is noted as 2*(a+b) but the 2 is different.. I guess it is treated as a string or something... For my cases it works since I'm not trying to calculate anything from the expression but just for visual purposes, other times though I might want to calculate(usually the visual doesn't matter in calculation but sometimes both are desired).

I really want to avoid having to litter the expressions with special syntax to get such simple behavior. Something to tell maple not to carry out whatever algebraic transform it is programmed to do.

BTW, what does ! do? !3 + 4 opens a new window with an exit code.

 First 10 11 12 13 14 15 16 Last Page 12 of 1635
﻿