Maple 13 Questions and Posts

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

I have the simplified version of what I want to do:

restart: with(LinearAlgebra):
d:=4:

product(MatrixExponential(I*Matrix(d,{(l,l)=1})*A[l,l]),l=1..d):

 

But I get the following error:

Error, (in Matrix) integer indices required for Matrix

Help appreciated.

 

 

 

restart:
with(LinearAlgebra):
with(ArrayTools):
with(Statistics):
randomize():
with(plots):
with(combinat):

n := 100:
nstock := 7:
corr := .8:

R := Matrix(nstock, nstock, proc (i, j) options operator, arrow; `if`(i = j, 1, corr) end proc):
CD := Matrix(LUDecomposition(evalf(R), 'method' = 'Cholesky'), datatype = float[8]):

ev := [seq((1/5)*(rand(-3 .. 4))(), i = 1 .. nstock)]:
st := [seq((rand(1 .. 2))(), i = 1 .. nstock)]:

Hey folks I need some help with basic string manipulation.

 

Say I want to find the sum of the digits of 123

 

What I've been doing is the loooong way of converting 123 to a string, breaking it up into 3 seperate numbers, converting these back to their decimal value, then adding them up.

 

How could I make this more efficient? Is there some part of StringTools that would do this for me?

 

Then...

Is there a function or procedure within Maple (v13) that will return the highest power of a polynomial?

 

Related to this, how do I determine the error return value from coeff(a,x,i) ?

 

TIA

Dears,  I want to generate a following matrix

g:=proc(i,k); if 86<=i<=100    then if i+1<=k<=100  then Y   end if end if end proc:

A:=Matrix(100,100,g);

Is this true (Can i use two if statments)

Could any one help me

Amr

Coon's patch defines a patch from 4 curves forming a chain. 4-examples to Coon's patch are given following worksheet. Boundary curves in the examples are constructed by parametric cubic curves (in Bezier and Hermite form). First example is in 3D and comparable to parametric bicubic surface. Rest of examples are in 2D (abstract surface) which can be described shortly as:

  • 2D Example#1: 4 circular-arc like curves are combined by Coon's patch to form a circular-like region



Let f:R-> Rm a linear function i need help about a proc about matrix of the linear map Df(x),

our input will be n,m and f

such that,f:R2->R3 ,f(x,y,z)->(x+y,y+2z,x+y+z) and i wish resulting output with derivative matrix with respect to the standard bases in R2 and R3

This post gives equation of stability region of a Runge-Kutta ODE solver (Dormand-Prince45) as implicit domain equation and ODE-IVP.

Contents are:

  • Runge-Kutta solver is implemented
  • Solver is applied to test equation and growth factor is obtained
  • Stability regions are defined by separating hyperplane (GF=growth factor=1)
  • Stability regions are plotted by bruteforce approach (implicitplot)
  • Boundary of stability regions...

> restart;

> with(plots);

BridgeHeight := 40;

BridgeFromCenter := 20;

BridgeToEdge := 35;

BridgeWidth := BridgeToEdge+BridgeFromCenter;

BridgeFromTheWater := 15;

BridgeLines := 10;

SpaceBetweenLines := 2*BridgeToEdge/BridgeLines;

 

LineStart := BridgeWidth;

CountLines := 0;

LineWidth := BridgeWidth;

while BridgeLines > CountLines do

CountLines := CountLines+1;

What it is wrong with this one-line-document:

 

with(Optimization): nx := Maximize(e^x, {x <= 1.})

 

that give this answer:

 

[9.99990000000000000*10^19, [e = 9.99990000000000000*10^19, x = 1.]]

Let X=(0,∞) x R and y=>g(y) be a given function. Find the solution:

(x,y)==>u(x,y)

To the initial value problem

(-x-y)ux(x,y)-(y)uy(x,y)+u(x,y)=0 for all (x,y)belonging to X

subject to u(0,y)=g(y).

 

I keep getting stuck; Any help would be amazing!

here is a matrix

A := Matrix(2, 2, {(1, 1) = ((1/2)*I)*E[0]*d[ba]/`&hbar;`, (1, 2) = -((1/2)*I)*delta, (2, 1) = ((1/2)*I)*delta, (2, 2) = ((1/2)*I)*E[0]*d[ab]/`&hbar;`})

it is clear that there is a common coeff with each element by ((1/2)*I,i just want to show the matrix with traditional way.

#A:="((1/2)*I*Matrix(2, 2, {(1, 1) = -E[0]*d[ba]/`&hbar;`, (1, 2) = delta, (2, 1) = -delta, (2, 2) = -E[0]*d[ab]/`&hbar;`})"

A1:=((1/2)*I;



here is an equation

eq := I*`&hbar;`*(sum((diff(c[n](t), t))*f[n](r)*exp(-I*omega[n]*t), n = l .. k)) = (1/2)*E[0](e_.r_)*e*(sum(c[n](t)*f[n](r)*omega[n]*(exp(I*t*(-omega[n]+Omega))+exp(-I*t*(omega[n]+Omega))), n = l .. k))

req := Int(conjugate(f[m](r))*rhs(eq), r)

leq := Int(conjugate(f[m](r))*lhs(eq), r)

sup:=Int(conjugate(f[m](r))*f[n](r), r) = delta[m, n]

ans:=applyrule(sup,leq=req)

how can get the result as

ans := I*`&hbar;`*(diff(c[m...

First 42 43 44 45 46 47 48 Last Page 44 of 54