MaplePrimes Questions

Hi everyone,

I'm a student studying pde's and I was trying to find a tool for me to understand it a lot better.

The heat equation is given by: Ut = a^2*Uxx

Take the example of a rod that is insulated at both ends (establishing BC's) of Ux(0,t) = 0 and Ux(L,t) = 0. Let's define the intial condition for any temperature at point x as x*(L-X).  We know that if we try to solve the steady-state solution, setting Ut = 0, we get Uxx = 0 which implies the general solution is U(x) = C1x + C2

From our boundary conditions we can see that a rod insulated at both ends -- and I should say laterally also -- should have a graph that turns from a quadratic to a horizontal line that is defined as the average of the initial conditon function from 0 to L.

 

In summary: Does maple have a feature to animate the function turning from a quadratic to a horizontal line? I think it would be beneficial in the long term for learning about BC's and visualizing them in my head after I play around with it.

restart:
N:=3:
for i from 1 to N do
x[i]:=evalf((2*i-1)/(N)) :
end do:
for i from 1 to N do
t[i]:=evalf((2*i-1)/(N)) :
end do:
f:=unapply(x*t,x,t);
g:=unapply(x^2*t,x,t);

Question 1: We have two functions f and g as above. How can we create a table which contains merged cells as follows by Maple? 

Question 2:  How to convert or export the table to LATEX?

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.

First 380 381 382 383 384 385 386 Last Page 382 of 2211