## Maple 13 Questions and Posts

##### These are Posts and Questions associated with the product, Maple 13

I need to calculate Weyl scalar for a metric using null tetrad using debever package in maple 13. However, I am stuck at the defination of h (representing the covariant complex null tetrad). Is it the product of covariant null tetrad? I have worked it out by using covariant, contravariant and both covariant and contravariant null tetrad (like l_a*l_a, l^a*l^a, l_a*l^a), however, i am not getting the right result not even for the example given in the maple help for plane wave. please help me out that how should i define this h.

thanks,
suresh

## Two plots together...

Hi Maple People,

My question is, "How can I combine the two plots shown in the attachment into one plot?".

Regards

Matt

## Differential equation in Maple...

Hello

I am new to Maple. I am solving the differential equation with the given initial condition. I am getting some error. Can anyone help me please.

Thanks

maple_help.mw

## The color option of plot...

Hi Maple People

# Some Maple code
restart
x:= Vector(10):
y:= Vector(10):

for z from -5 to 4 do
x[z+6]:=z^2 + 40:
y[z+6]:=z^2 + z + 41:
end do:

plot(x,y,style=point,symbol=asterisk)

Regards

Matt

## Equations of motions for Euclidean and Minkowski...

by: Maple 13

This procedure calculate the equations of motions for Euclidean space and Minkowski space  with help of the Jacobian matrix.

Procedures
Calculation the equation of motions for Euclidean space and Minkowski space

 Calling Sequence

Parameters

 parameterSequence - eq out equation of motion g out metric xup out velocitiy vector xa in position vector xu in vector of the independet coortinates eta in signature matrix for Minkowski space var in independet variable

 >

Procedur Code

 >
 >

Input

 >

 >

Output EOM

 >
 (5.1)

Output Line-Element

 >
 (6.1)

Output Metric

 >
 (7.1)
 >
 >

Procedures
Calculation the equation of motions for Euclidean space and Minkowski space

 Calling Sequence

Parameters

 parameterSequence - eq out equation of motion g out metric xup out velocitiy vector xa in position vector xu in vector of the independet coortinates eta in signature matrix for Minkowski space var in independet variable

 >

Procedur Code

 >
 >

Input

 >

 >

Output EOM

 >
 (5.1)

Output Line-Element

 >
 (6.1)

Output Metric

 >
 (7.1)
 >
 >

## Einstein Field Equations...

I am using maple 13 to get the result of the einstein field equations,

with(tensor)

...

Estn := Einstein(metric, RICCI, RS);

displayGR(Einstein, Estn);

How can I put the result on an array element, so I can use it later on?

## Integral of product of B-splines...

I wrote the following procedure that evaluates i-th B-spline basis function of degree n over the knot vector T:

N := proc(i, n, t, T)

if (n = 0) then
if ((t >= T[i]) and (t < T[i+1])) then
return 1.0:
else
return 0.0:
fi:
fi:

return (evalf((t-T[i])/(T[i+n]-T[i]))*N(i, n-1, t, T) + evalf((T[i+n+1]-t)/(T[i+n+1]-T[i+1]))*N(i+1, n-1, t, T)):

end proc:

Now, I want to compute

int(N(i, n, t, T)*N(j, n, t, T), t=0..1, numeric),

where i, n and T are given. However, Maple evaluates N and, since t is unknown, I get the following error:

"Error, (in N) cannot determine if this expression is true or false: .1 <= t and t < .25"

In http://www.maplesoft.com/support/help/Maple/view.aspx?path=evalf/Int  I read that in order to integrate a procedure, one should write (see the example given there)

evalf(Int(N*N, 0..1));

however, in my case, It will not work because I must pass the known parameters i, n and T. Is there a way to solve my problem?

## How to convert expression to sum?...

I get the maple result as a product and sum off terms

x= (a+b*c)/d

i want to convert it to

x= a/d+b*c/d

i try to use convert(x,?)

## Problem with solution of ODEs...

Hi everyone

When I solve these nonlinear ODEs, there is this problem i.e. Highlighted in yellow, in my solution. How can I solve it?

thanks a million!

## Hilbertmatrix and reflectionmatrix...

Hi, I have 2 Questions about programming in maple. I will be thankful if you help me as soon as possible.

First; How can I display a n*n HilbertMatrix?

Second: I wanna make a 2*2 matrix which its transpose is egual to its inverse, How can I do that by helping reflectionmatrix?

(I'm an amateur programmer, I use maple 13 on my pc)

## How to optimize this code?...

a1:= f(x) :
> T1 :=simplify((taylor(a1,x=alpha,N+3))):
> E1:=subs([seq(((D@@i)(f))(alpha) = 0,i=1..m-1),f(alpha)=0,x=e[n]+alpha],T1):
> g1 :=(convert(simplify(series((E1,e[n]=0,N))),polynom));

## How to express this constraint into Maple?...

Hi everyone...!

Can somebody tell me how to express this equation in Maple?

xij <= zkl ; ∀ i ∈ I: S(i)=k, ∀ j ∈ B: R(j)=l;

Currently I'm dealing with containerization problem and have 4 indexes in the constraints (namely: i for item, j for container, k for shipment, l for route, S for Set of Shipment, and R for Set of Route) while x and z are binary variables. What I want to express is: (for example), item 1,2,3 are in shipment 1, item 4,5 are in shipment 2, etc etc. SO, if i = 1,2,3 then the value of k will be 1. If i = 4,5 then the value of k will be 2, etc. Same thing goes to j and l, (for example) if j = 1,2 then the value of l will be 1, etc etc. Further depcition is more or less like this:

S(i) = k

S(1) = 1

S(2) = 1

S(3) = 1

S(4) = 2

S(5) = 2

Thank you very much for the help.

## Two independent variables...

HI, I am trying to solve two PDEs but in boundry conditions there is arising an error plz help.
Nazi.mw

## Two questions on conversion...

To check one of the MythBusters TV episodes, i.e., the fall of a mannequin (80 Kg) from a plane at an altitude of 1200 m in 31 s, with Maple13 (Windows Vista) I solved the following differential equation with initial conditions:

> de:= m*(D@@2)(x)(t) = m*g - k*(D(x)(t))^2:

> ini:= (x(0) = 0, D(x)(0) = 0):

> X:= unapply(rhs(expand(dsolve({de,ini}))),t);

X := proc (t) options operator, arrow; -m^(1/2)*g^(1/2)*t/k^(1/2)-m*ln(2)/k+m*ln(exp(2*g^(1/2)*k^(1/2)*t/m^(1/2))+1)/k end proc

1) Posing: V0 = sqrt(m * g / k),  T = sqrt(m/(g*k)) one has  V0*T = m/k. I want to have:

> Xxb:= t -> V0*(- t + T * ln((exp(2*t/T) + 1)/2) ); # m.

How to obtain this equivalent equation  Xxb(t), without retyping the equation of  X(t) ? With subs , convert or simplify  applied to  X(t), Maple 13 gives error messages.

2) Taking the derivative of  Xxb(t), one find :

V := proc (t) options operator, arrow; V0*(exp(2*t/T)-1)/(exp(2*t/T)+1) end proc.

How to transform it to V = V0 tanh(t/T) ?

Again, subs , convert or simplify  seem not working, even with  assume(t, real), assume(T, real) ! I know simplify is a difficult task, but Maple should recognize a tanh !

Thank you in advance for any suggestion.

( Note that with m = 80 Kg, g = 9.81 m/s^2 and k = 0.267482 Kg/m, which correspond to a speed limit of V0 =195 km/h, on find t(1200m) = 26 s, instead of 31 s ).

## Convergence of Newton method...

let γ be the root

i have to apply taylor series on f(x) and then do some substitution like (helped by a member of Mapleprime)

restart;
taylor(f(x), x = gamma, 8);
f(x[n]) := subs([x-gamma = e[n], f(gamma) = 0, seq(((D@@k)(f))(gamma) = factorial(k)*c[k]*(D(f))(gamma), k = 1 .. 1000)], %)

then find the derivative of result from above output

i do

b := diff((x[n]), e[n])

basically i have to find the value of newton method which is

yn=xn-f(xn)/D(f)(xn)

here we substitute xn=γ and D(f)(xn)=b

and then want to apply f on yn

there are to problem which i face

1  f(xn)/D(f)(xn) is not in simplified form i-e O(e[n]^8) and O(e[n]^7) is appeared in numerator and denominator respectively. how we get the simplified result.

2 wht step should i do to find f(yn)

plx help me to do this