MaplePrimes Questions

Hi,

For the paste several years, I have occasionally tested Maple on a simple integral,

simplify(int( exp(-I*k*x)/cosh(x), x=-infinity..infinity) assuming k,real);

The integral is returned unevaluated. There is no problems related to the complex exponential,

since also e.g.

simplify(int( cos(k*x)/cosh(x), x=0..infinity) assuming k,real);

and other variants are not evaluated.

Turning to the inbuilt fourier function (inttrans package) also does not work.

Evaluating laplace(1/cosh(x),x,s), and subsequently substituting s=I*k and s=-I*k and summing WORKS,

but gives (unnecessarily) an ugly result which it cannot simplify.

Finally, subtracting the (manually simplified) correct expression and simplifying gives 0 as

verification. I can not see any technical explanation for this bug.

Hi everybody,

how about a little arithmetical challenge?

 

known quantities : Z, t, epsilon : reals

let W = X+Y*t    X, Y integers, t real (t with unlimited precision)

let W = Z + epsilon (epsilon < 1/W), Z real (Z with unlimited precision)

W and Z have same decimal expansion ( W - Integerpart[W], Z - IntegerPart[Z] ), up to a certain "rank" (determined by the precision : epsilon)

Y*t and Z have same decimal expansion, up to a certain "rank".

The problem : build an algorithm to find the integer Y, using the "usable" decimal expansion of Z.

 

Thanks in advance for your contributions!

I am trying to find the root of an equation. The problem is, I keep getting the error

"Error, (in fsolve) Can't handle expressions with typed procedures"

and 

Warning, solutions may have been lost


whenever I try to solve it. Anyone have any ideas? My worksheet is here:  1.mw

Hello,

I have some points that i have plotted thanks to the function pointplot.

Is it possible to add tags next the points (like it is possible in Excel) ?

Of course, I have a vector with the definition of the contents of the tags that I would like to add.

 

Thanks a lot for your help

Hello,

I cant find solution how to create matrix form from equations of motion. Equations looks like this:

My equations ar much more complicated and one of them looks something like this:

 http://i63.tinypic.com/21c5ctk.png

and I want form like this:

I tried to do it using the Generate Matrix but it does not work as I expected. How can you get this form?

how to convert system of differential equations to differential form for evalDG?

 

[a(t)*(diff(c(t), t))+b(t), a(t)*(diff(b(t), t))+c(t)*(diff(b(t), t)), a(t)*(diff(c(t), t))+a(t)*(diff(b(t), t))+b(t)];

when i try eliminate dt which is the denominator

eliminate([a(t)*dc(t) + b(t)*dt,a(t)*db(t)+dt*c(t)*db(t),a(t)*dc(t)+a(t)*db(t)+b(t)*dt],dt);

[{dt = -a(t)/c(t)}, {a(t)*(c(t)*dc(t)-b(t)), a(t)*(db(t)*c(t)+c(t)*dc(t)-b(t))}]

 

i got two solutions, which one is correct?

a(t)*(c(t)*dc(t)-b(t)), a(t)*(db(t)*c(t)+c(t)*dc(t)-b(t))

does it mean that two have to use together to form a differential form?

 

update1

with(DifferentialGeometry):
DGsetup([a,b,c], M);
X := evalDG({a*(c*D_c-b), a*(D_b*c+c*D_c-b(t))});
Flow(X,t);
Flow(X, t, ode = true);

got error when run with above result

 

Hey all,

 

The title is probably very poorly explained and doesn't make much sense at all, but here goes nothing:

I define at the start of my .mw file that M:=1, but I need to be able to change it in order to run multiple different iterations.

So what I've come up with so far is a way to get a variable ammount of equations named "eqc(1,3,5,...)" The number of equations I get is equal to the M defined in the beggining. How would I go about solving this?
To give you an idea of something to work with:

So basically I'd need to solve as many of these eqc equations as I get. If I change M to, lets say 30, I'd need to solve 30 equations. This solve option above doesn't work and I've messed around with Vectors and Matrixes but I honesly have no idea what I'm doing there, so I thought best to seek out help.

 

Thanks in advance, Rafael.

How I can solve this:

 \lambda(x_0) = \lim_{n\rightarrow\infty} \frac{1}{n} \ln\left|\frac{df^n(x_0)}{dx}\right|
for different fn(x0) ? for f(x)=exp(x^2(a-x))



Hey,

 

I'm trying to make a sum of only odd numbers regarding 2 functions and I've come up with what I assume is a terrible way to do it...

So basically what I want to write is this:

 


And this should give me something like this:


This works, what I have now. The thing is I need to be able to add and subtract terms in order to compare with other stuff and it just seems so inefficient right now.

 

Thanks in advance!

 

 

I want to compute delta but i do not want to show result for delta. i know i need to put 
delta := unassign('delta');
but i do not know where to put, i try and error so many times but the answer still the same. 
the answer should be in marix form 2x2 
[-δD11   0    ]
[0         D22]



>derivation := proc (A, n)
local i, j, k, t, s1, m, D, sols, eqns, BChange, delta; eqns := {}; D := matrix(n, n); BChange := matrix(n, n);
for i to n do
for j to n do
for m to n do
s1 := sum(0*A[i, j, k]*D[m, k], k = 1 .. n)-(sum(A[k, j, m]*D[k, i]+delta*A[i, k, m]*D[k, j], k = 1 .. n));
eqns := `union`(eqns, {s1})
end do
end do
end do;
sols := [solve(eqns)];
delta := unassign('delta');
t := nops(sols);
for i to t do
for j to n do
for k to n do
BChange[k, j] := subs(sols[i], D[k, j])
end do
end do;
print("BChange:=", BChange)
end do
end proc

> AS1 := array(sparse, 1 .. 2, 1 .. 2, 1 .. 2, [(1, 1, 2) = 1]);
> derivation(AS1, 2);

Consider the following dynamical systems with time delay:

diff(x(t), t) = y(t)-bx(t)^3+ax(t)^2-z(t-tau)+I

diff(y(t), t) = c-dx(t)^2-y(t)

diff(z(t), t) = r(s(x-beta)-z(t))

Here the values of the parameters are a = 3, b = 1, c = 1, d = 5, s = 4, beta = 1.6, r = 0.6e-2, I = 3.0

 

Please help me 

How to write code for bifurcation plot for the above differential equations with delay.

Delay as taken as bifurcation parameter.

 

Reply message is very useful.

 

Thanks in Advance

 

Hi guys,

 

I would like to convert a piecewise defined function of two variables into an if structure
Example :

F := (x,y) -> piecewise(x < 0, piecewise(y < 0, 0, 1), piecewise(y < 0, 1, 0));

What I expect is something like (the indentation is just for fun)
if x < 0 then
   if y < 0 then 0 else 1 end if;
else 
   if y < 0 then 1 else 0 end if;
 end if


I tried the following :

convert(F(x,y), `if`)  # but it only converts the "outer x condition" and keeps the "inner y conditions" unchanged

And next this :

map(u -> convert(u, `if`), F(x,y)):   # fails to give m
# and
map(u -> convert(u(x,y), `if`), F(x,y)): 
# ...

without success.

Can anoybody help me please.
I am also interested in an explanation of the reasons why the previous command do not work.

Thanks all

How do I get the Matrix to recalculate?

restart

a := 5

5

(1)

``

M := simplify(Matrix(2, 2, {(1, 1) = a, (1, 2) = 2*a, (2, 1) = 3*a, (2, 2) = a^2}))

M := Matrix(2, 2, {(1, 1) = 5, (1, 2) = 10, (2, 1) = 15, (2, 2) = 25})

(2)

``

unassign('a')

a

a

(3)

 

M

Matrix(2, 2, {(1, 1) = 5, (1, 2) = 10, (2, 1) = 15, (2, 2) = 25})

(4)

expand(M)

Matrix(2, 2, {(1, 1) = 5, (1, 2) = 10, (2, 1) = 15, (2, 2) = 25})

(5)

``

 

Download Re-evaluate_a_Matrix.mw

Hi,
I want to plot stream lines from a stream function given by " psi = x*f(eta)+int(h(s), s = 0 .. eta) " where "f(eta)" and "h(eta)" are the solution of the differential equation given below:

restart;
with(linalg);
Digits := 24;

eq1:=diff(f(eta),eta,eta,eta)+f(eta)*diff(f(eta),eta,eta)-(diff(f(eta),eta))^2+1;
eq2 := diff(h(eta),eta,eta)+f(eta)*diff(h(eta),eta)-diff(f(eta),eta)*h(eta);
bc:=f(0)=0,D(f)(0)=0,D(f)(6)=1,h(0)=0,D(h)(6)=1;
A1:=dsolve({eq1,eq2,bc},numeric,method=bvp[midrich],abserr = 1.*10^(-10),output=operator):

How can I do this?

I am using a stoiciometric matrix to generate a system of differential equations (this makes them easier to check). There are 13 chemical species and 16 reactions so I need to make and display vectors of length 13 and 16; as well as a 13x16 matrix.

When I make Vectors of this size they don't get displayed; I just get information about the vector (Fortran order etc) and this is the same for the matrix.

How do i make/edit/display Matrixes nd Vectors of this size?

First 1123 1124 1125 1126 1127 1128 1129 Last Page 1125 of 2428