Rouben Rostamian

MaplePrimes Activity


These are questions asked by Rouben Rostamian

Consider a standard initial/boundary value problem for the heat equation on the interval x ∈ [0,1]:

restart;
pde := diff(u(x,t),t) = diff(u(x,t),x,x);
ic := u(x,0) = f(x);
bc := u(0,t)=0,  u(1,t)=0;

Then
pdsolve({pde, ic, bc});
produces the expected Fourier series solution.

However, if we change the interval to x ∈ [-1,1], as in:
bc := u(-1,t)=0,  u(1,t)=0;
pdsolve({pde, ic, bc});

then Maple fails to return a solution.  Why?

It is evident that by repeated applications of the double-angle and product trigonometric identities, one may transform any monomial of the form sin(x)^p * cos(y)^q, where p and q are positive integers, to a linear combination of only first powers of sines and cosines.

Example 1:  The monomial  4*sin(x)*cos(y)^2 is equivalent to

 

Example 2: The monomial 16*sin(x)^2*cos(y)^3 is equivalent to             

How does one write a Maple procedure to do that transformation in the general case of sin(x)^p * cos(y)^q?

 

Let

z := Diff(x(t),t)*y(t) + x(t)*Diff(y(t),t);

Is there a way to tell Maple to collapse that into Diff(x(t)*y(t), t) ?

I tried factor, combine, simplify, but none of them worked.

 

 

I want to solve the system of differential equations
sys :=
  diff(x(t,s),t) = y(t,s),
  diff(y(t,s),t) + x(t,s) = 0;

subject to the initial condition
ic := x(0,s) = a(s),
      y(0,s) = b(s);

where a(s) and b(s) are given.

This looks like a system of PDEs but actually it is a system
of ODEs because there are no derivatives with respect to s.
It is easy to obtain the solution by hand:

x(t,s) = b(s)*sin(t) + a(s)*cos(t)
y(t,s) = b(s)*cos(t) - a(s)*sin(t)

I don't know how to get this in Maple, either through dsolve()
or pdsolve().

Actually both dsolve({sys}) and pdsolve({sys}) do return
the correct general solution, however dsolve({sys, ic})
or pdsolve({sys, ic}) produce no output.  Is there a trick
to make the latter work?

 

Given a list L of n^2 integers, I can fill an nxn matrix through Matrix(n,n,L).  for instance:
n := 4:
L := [$1..n^2]:
A := Matrix(n,n, L);

I don't know how to do this with a 0-based Array.  I wished that as in the case of the Matrix, the command
B := Array(0..n-1, 0..n-1, L);
would assign B[0,0]=1, B[0,1]=2, ..., B[3,3]=16, but it doesn't.

I know how to fill B's entries through doubly nested for-loops but I suspect that there might be a clever way of doing that. If so, then please show me how.

 

First 10 11 12 13 14 15 16 Page 12 of 16