MaplePrimes Questions

I want to solve the following ode: 

ode := diff(x(t), t) = k*(a - x(t))*(b - 2*x(t))^2

k, a and b are positive real numbers and I want to add the condition that a-x(t) >= 0 and b-2x(t) >=0, in addition to x(0)=0

how to I do that?

Hi

I have been making a 3d graph of the level sets of a function. Here is the code for the 3d graph:

display(seq(seq(plot3d([i/sin(u), u, j], u = 0 .. 3/2, t = 0 .. 10, view = [0 .. 10, 0 .. Pi/2, 0 .. 10], color = i*j), i = 1 .. 10), j = 1 .. 10))

Each curve is a different level set- and I'd liketo colour them all individually -so people can tell tham appart. Any variation of the code I've made makes each of the curves black.


 

Hi everybody

I have a problem with finding the interpolation function from a data list.

In Mathematica I can find the interpolation function from a set of data simply as below:

data := {{13, -2}, {12, -1}, {11, 0.0}, {10, 1}, {9, 2}, {8, 3}, {7, 
   4}, {6, 5}, {5, 6}, {4, 7}, {3, 8}, {2, 9}, {1, 10}}

g := Interpolation[dat]

Plot[g[x], {x, 1, 9}] (see the attached file for the diagram)

The mathematica software gives simply the interpolating function and then we can work with it.

However, I cannot do the same procedure with maple.

Would you be so kind as to let me know how can I make an interpolating function for these set of data in maple?

Thank you very much and best regards.

Hadi

How would one go about and solve a boundary value problems i.e.:

y'' + a* y = 0 under dirilecht boundary y(0) = 0 and y(L) = 0; I know this shouldn't yield a trivial solution

likewise if i wanted to do neuman or mixed conditions, how should i approach that? 

thanks

 

Dear all, 

Would you let me know how to run a matrix differentiation?

restart;
with(LinearAlgebra):

with(VectorCalculus):

x:=<<x1>,<x2>>

W:=<<w11, w12>|<w21, w22>>
Cal:=Transpose(W.x).(W.x)

## Up to this point, there was no problem 

map(diff,Cal,x) ## Then, this operation caused an error

 

What I wanted to do is 

diff(VectorCalculus:-Norm(W.x)^2, x)

 

Thank you, 

In Kwon Park 


 

 

 

L := proc(N) N; end:
plot([seq(L(min(5, max(-5, 5^(x*10) + 5^(x*k))),k=0..10))], x = 0..3);

 

Warning, expecting only range variable x in expression max(-5,5^(10*x)+5^(x*k)) to be plotted but found name k

 

Removing L and everythign works. I want maple to first compute the inner expression before calling L. But even thenn it shouldn't matter in this case, it is just an identity function.

 

There should be no reason why this can't be done. I experience this *type* of problem with maple a lot. Where it seems to try to compute everything symbolically and breaks in some cases for unknown reasons.

 

I want to find the numbers a, b, c, d, t, m, n of this equation. I tried
 

restart:
 k := 0:
 for a to 10 do
for b to 10 do 
for c to 10 do 
for d to 10 do 
for t to 2 do 
for m to 10 do
for n to 10 do 
if a > c and igcd(a, b, c, d, t, m, n) = 1 and abs(b)+abs(d)-n <> 0 then X := [solve(abs(a*x+b)+abs(c*x+d)-t*x^2+m*x-n = 0)]; if nops(X) = 6 and type(X[1], integer) and type(X[2], integer) and type(X[3], integer) and type(X[4], integer) and type(X[5], integer) and type(X[6], integer) then k := k+1; L[k] := [a, b, c, d, t, m, n, X[]] 
end if end if
end do end do end do end do end do end do end do; 
L := convert(L, list); 
k; 
L;

I can not get the result for along time. How can I get the result and reduce the time?

Is it possible to create the operator command : |x| so that it passes x to the VectorCalculus Norm function so that if I write:

>  | < 3, 0, 4> |

the result is 5?

I have a Maple program and i need to call a python script with a specified input (10 integers). The script returns a number that I would like to use in my Maple program afterwards. This is what I would do in shell:

```

result=`python model.py 1 2 3 4 5 6 7 8 9 10`
echo $result

```

Is there a way to get the `result` using Maple? I checked the documentation for Maple and it is not very clear so I appreciate any help on this. Thanks!

Hi everyone:

I have a matrix with 2(n+1) row and (n+1)^2 column, for example, the matrix A at the below with n=1:

A:=Matrix(4, 8, [[-1, 1-t, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1+t, 0, 0, 0, 0], [0, 0, 0, 0, -1, 1-t, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1+t]]);

I want to obtain the B matrix that created by the matrix A with a general code in Maple:

B:=Matrix(4, 8, [[-1, 1-t1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1+t1, 0, 0, 0, 0], [0, 0, 0, 0, -1, 1-t2, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1+t2]]);

I can the create the A matrix with any value of n and my goal is create the B matrix? 

tnx...

This question is used for general demonstration purposes only. I wish to animate a periodic function whose amplitude is growing and I'd like to trace the growth over time.

Can anyone suggest a simple function that can provide this requirement? The example given here is the basic sine curve of fixed amplitude and wavelength.

Thanks for reading.

MaplePrimes_Question.mw

Hi,

From a previous calculation, I got the following nested sum:

Sum(Sum(f[n]*g[q-n]*exp(2*i*Pi*q*x),q = -infinity .. infinity),n = -infinity ..
infinity)

 

However, to keep on the calculus, It is more convenient to have:

Sum(Sum(f[n]*g[q - n]*exp(2*i*Pi*q*x), n = -infinity .. infinity), q = -infinity .. infinity)

 

That is, permute the summation precedence.

Is there a way to automatically transform the first expression into the second one?

Can Minimize function in maple locate all the local optima of a function. Thank you.

ODE := 2.56*(diff(x(t), t, t))+.32*(diff(x(t), t))+x(t)+0.5e-1*x(t)^3 = 2.5*sin(t)

a1 := 2.56; a2 := .32; a3 := 0.5e-1; B := sin(t)

dfieldplot([diff(x(t), t) = y(t), diff(y(t), t) = (B-a2*y(t)-x(t)-a3*x(t)^3)/a1], [x(t), y(t)], t = -2 .. 2, x = -1 .. 2, y = -1 .. 2, arrows = SLIM, color = black, dirfield = [10, 10])

Error, (in DEtools/dfieldplot) cannot produce plot, non-autonomous DE(s) require initial conditions.
 

I frequently title my plots to identify what is being plotted. Very often that means specifying a parameter. For example, I might want the title to read;  Exponential when the power is c.

In the above I want to replace c with a real number. For example, my command might read

> for c from 1 to 10 do
p||c := plot( x^c, x= -1..1, title= the power is c )
end do:

I can then display the sequence of plots nicely labelled.

That does not work.

 

I cannot find adequate  info about what follows title =  in the help pages or the manual so I end up creating a worksheet and experimenting for quite a while until I find something that works.
(The Help page says: “The value t can be an arbitrary expression.” That’s it. One can go to the typesetting page to get more info about captions which is probably relevant but it begins to feel like learning about sex by looking up words in the dictionary.


BTW, I have been using Maple for 18+ years so I should have a cheat sheet somewhere to remind me of the correct syntax but I am suggesting that Maple would be much more user friendly if this info was in the help pages.

It would be very nice to have a fuller explanation with more examples.

Here is what works:


c:=3;  # special case

 

plot(x^c, x=-1..1,title=`power is `|| c);  Why back quotes?

or

cc:=convert(c,string);
plot(x^c,x=-1..1,title=[`power is `||cc]);   why barckets?

or not as nice
plot(x^c,x=-1..1,title=power.is.cc);  why dots?

or if you get rid of the is
plot(x^c,x=-1..1,title=[power = c]);  why noy use is?

 

not as nice
plot(x^c,x=-1..1,title=[power = cc]);  ugly quote marks

 

Here is a list of failures in this very simple case:

 

c:=3;

 

plot(x^c,x=-1..1,title="power is c");

 

plot(x^c,x=-1..1,title=power is c);

 

 

cc:="c";plot(x^c,x=-1..1,title="power is cc");
or

plot(x^c,x=-1..1,title=power is cc);


plot(x^c,x=-1..1,title=power.is.cc);

 

cc:=convert(c,string);plot(x^c,x=-1..1,title="power is cc");

 

cc:=convert(c,string);plot(x^c,x=-1..1,title="power is cc");

 

plot(x^c,x=-1..1,title='power is cc');

 

plot(x^c,x=-1..1,title=[power, is, cc]);

 

plot(x^c,x=-1..1,title='power = cc');

 

plot(x^c,x=-1..1,title=power = cc); but plot(x^2,x=-1..1,title=[power = cc]);is acceptable

another couple of failures:

plot(x^c,x=-1..1,title=[`power is c`]);

 

plot(x^c,x=-1..1,title=[`power is cc`]);

 

 

First 597 598 599 600 601 602 603 Last Page 599 of 2427