## plotting the result of pde system...

I have a system of pdes and solved numerically using pdsolve (numeric) command.

The system consists of four first order partial differentia equations.

for example u(x,t), R(x,t)....

what command should I give to the Maple and get the graph of u(x,t) at a specific point x_0?

For example, I need a plot for u(30,t).

Is it possible with the maple plot?

Thank you for reading this post. :)

## How do i write a code to solve a matrix in Maple?...

Write a Maple code that performs the Gaussian elimination for an nxn matrix, converting it to an upper triangular matrix.

(Hint: you will need to use three for .. do loops.)

## Translate maple code to C code...

I want to translate my maple code with matrice multiplication  to C code. But the command  "Multiply" cannot be translated. So I want to edit the function translation by myself. I use "AddFunction" command to create a new function  "Multiply" and want to specify its corresponding C code.

f := proc ()
local x,y;
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a,b;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

But when I run it, the "Multiply" function cannot be translated.  The result is:

Warning, type signature [CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions()), CodeGeneration:-Names:-ArrayType(integer,CodeGeneration:-Names:-ArrayRanges(1 .. 2,1 .. 2),CodeGeneration:-Names:-ArrayOptions())] for function Multiply is not recognized
void f (void)
{
int x[2][2];
int y[2][2];
x[0][0] = 1;
x[0][1] = 2;
x[1][0] = 3;
x[1][1] = 4;
y[0][0] = 1;
y[0][1] = 3;
y[1][0] = 4;
y[1][1] = 2;
Multiply(x, y);
;
}

I don't know why "Multiply(x,y)" cannot be translated.

If I put two "Multiply(x, y)" in the procedure, like this:

f := proc ()
local x,y;

Multiply(x, y);
x := Matrix([[1, 2], [3, 4]]);
y := Matrix([[1,3],[4,2]]);
Multiply(x, y);
NULL;
end proc;

LanguageDefinition:-Define("NewC", extend = "C", AddFunction("Multiply", [Matrix,Matrix]::Matrix,
proc (X, Y)
local a;
a := 2;
b := convert(a, string);
Printer:-Print("Mmultiply(", X);
Printer:-Print(",", Y, ")"); Printer:-Print("\n");
Printer:-Print("from", b, "to");
Printer:-Print(",", Y, "do") end proc, numeric = double));
Translate(f, language = "NewC")

THe result is:

Warning, cannot resolve types, reassigning x's type
Warning, cannot resolve types, reassigning y's type
Error, (in CodeGeneration:-IssueError) type 'Matrix' cannot be translated to target language

I don't know why type 'Matrix' cannot be translated.

## How do I solve an ODE when I get _z1 in the soluti...

Attached is a photo with the code I am working for.

On the top is practice code with a simpler ODE to help with trouble shooting, on the bottom is the ODE I am working with.

I was hoping to gain insight about the _z1 symbol in the solution, I haven't been able to find much help on other threads.  I would like to know how I can go about working with it - if it is something on my end or if it is the nature of the equation I am working with.

Thank you for any help,

Josh

## How does one change the color/transparency of vect...

I have a nice procedure that is as follows, that explores the behaviour of a mapping in R^2.

InversePoincare := proc (v) options operator, arrow; v*Norm(v, 2)/(1-Norm(v, 2)^2) end proc

local listOfPairs;
if lengthParam = false then
return arrow(listOfPairs, scaling = constrained, shape = arrow)
else
return arrow(listOfPairs, length = lengthParam, scaling = constrained, shape = arrow)
end if
end proc

Essentially, we plot vectors v at location u. Since the vectors v in general vary wildly in magnitude, I would like to visualize the magnitude change by using color and/or transparency, preferably the latter. Is it possible to do so, and if so, how?

## on the frequent change of determinant in each run ...

Hi,

Recently a a simple problem which i can not handle by myself, made me confused.

I have simple code of maple which is not stable at all. Everytime I run the code, the final result which is the determinant of a matrix, changes and I can not see the problem with the code. In fact i noticed that problem occures when the matrix is being build by culculating the coefficients of some constant values.  I have attached the code. Could you see what is wrong here?

Thanks by the way.

## How to change page color...

hi, is there a way to change color of the page in Maple 18? in fact I am preparing my lectures using slideshow option and want to change the color instead of the default white.

## Maple nested loop error: unterminated loop...

Hi,

I'm, trying to write a nested loop in maple, but I keep getting the Unterminated Loop error. I'm sure the solution is quite simple, but I haven't been able to find it. Any suggestions would be much appreciated. The loop looks like this:

i:=0:
di:=25:
n:=1:

while (n<=nLimit) do
sol1:=fsolve(eq1, y=i..i+di)
if type(sol1, numeric) = true then
lambda(n) :=sol1
i:=i+di
n:=n+1
else  i:=i+di
end if:
end do:

## Calculate area using integration...

Hello,

please explain how to write a code to calculate and output the actual area using integration for y=X^3 over range (0,2) using left-hand rule and 200 subdivisions?

Thank you

## finding a solution of system of equation...

please is there any one can help me to find a solution of a sytem of 3 non linear equations each with 3 variable and with more than 30 unknown coefficients

this is the system

solve({EEE_x(x, y, z) = 0, EEE_y(x, y, z) = 0, EEE_z(x, y, z) = 0}, {x, y, z})

where x,y,r are the unknowns

and the three equations are simply the partial derivative with respect to x,y and z repectively

EEE_x(x,y,z):=(&DifferentialD;)/(&DifferentialD; x) EE(x,y,z)

EEE_y(x,y,z):=(&DifferentialD;)/(&DifferentialD; y) EE(x,y,z)

EEE_z(x,y,z):=(&DifferentialD;)/(&DifferentialD;z)EE(x,y,z)

the main equation is EE where (it has 3 variables and more than 30 qunknowns coefficients

(x, y, z) ->

1
----------------------------------------------------------------
2
/ 2 2 2\
hh \ii + jj x + ll z + mm y + 100. y + nn y z + oo x + pp z /

/ 2 2 2 2 3 2
\p z y + q z y + l z x + g z x + o z y + n z x + m y x

2 2 2 3 2 2 2
+ j y x + k y x + i z y + d z y + f z x + h z y

2 2 4 3 2 3
+ e y x + u z y x + v z y x + a + b x + c x + r x + s z

2 2 4 3 4 \
+ t z + bb z + cc y + dd y + ee y + ff y + gg z + aa x/

## Lots of memory errors and leaks in openmaple libra...

This is a question I have also submitted to the technical support, I am worried that it is a bit too technical for them, however:)

I am debugging a C program which links against the OpenMaple API library (under Linux and with Maple 17 and 18). I am using valgrind memcheck, because I am experiencing strange behavior which could be due to writes beyond allocated blocks of memory.

The first thing which jumps to my eye, are many errors of the types

``Use of uninitialised value of size (4/8/16)Invalid read of size (4/8/16)Conditional jump or move depends on uninitialised value(s) ``

The same errors are also printed when I use the examples that ship with Maple. For instance, I compile "simple.c" with

gcc  -Wl,--no-as-needed -lmaple -lmaplec -lrt -L /usr/lib -L \$MAPLEDIR/bin.X86_64_LINUX -I \$MAPLEDIR/extern/include -o simple simple.c

and run valgrind as

valgrind --tool=memcheck --error-limit=no --log-file=memcheck.log ./simple

Some, but not all, of the errors occur in `__intel_sse2_strcpy` or `__intel_sse2_strlen`. Furthermore, according to valgrind there are definite memory leaks. which appear in the library.

Practically this makes it hard for me to identify my potential own errors. I am a bit surprised to see so many warnings because I tend to fix my own programs until memcheck does not print these anymore (before I give it away at least). The question is: Can I consider these errors as safe to ignore? How would I distinguish real errors which may appear in my application?

## Can I use different numerical methods to solve a s...

I'm trying to solve a system of four pdes and I know that the Newton method won't converge.

Are there other numerical methods that I can use?

Any help would be greatly appreciated!

Thanks,

Eve

## algsubs in equation with multiple derivatives...

I am trying to simplify equation 18 using equations 8 and 9. It should look a little like equation 21, but instead I get the results in equations 19 and 20.  I tried using different substituions, but algsubs gets the closest answer. A few terms are going to zero after the substitution.

When I substitute Z(X) then Zbar(X) terms vanish, and visa versa.

 (1.1)

 (1.2)

 (1.3)

 (1.4)

 (1.5)

 (1.6)

I will try to verify the tetrad from (Kerr and Schild (1965)). However, the tetrad given in the paper seems to have the third tetrad with the wrong sign. I changed the sign and get the correct verification,

 (2.1)

 (2.2)

 (2.3)

 (2.4)

 (2.5)

 (2.6)

 (2.7)

 (2.8)

For equation 2.8 we get the following:

 (1)

Now we replicate eqn 2.16. These are the conditions for e[4,mu] to be geodesic and shear-free. The outputs are eqn 3.5.

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

Now we can define the rotation coefficients associated with rotation and expansion z = theta - i omega

 (8)

 (9)

 (10)

 (11)

We now show that the tetrad vectors are propogated parallel along each curve of the congruence of null geodesics which have e[4,~mu] as tangents.

We now use the tetrad form of the Ricci tensor. In order to use this in Maple we need to create a Ricci Tensor Tetrad function.

 (12)

 (13)

 (14)

 (15)

 (16)

 (17)

The geodesic and shear free condition given by Lemma 1 in (Goldberg and Sachs (1962)). Kerr uses the fourth tetrad instead of the third so we need to modify the Ricci tensor conditions. The equations (2) - (5) enforce the first Lemma.

Notice that none of the previous Ricci conditions can be used to solve for H.  We can use the remaining field equations to find the partial differential equations necessary to derive the metric.

 (18)

 (19)

 (20)

 (21)

## Difficulty with using Explore and plot with parame...

Hi,

I'm trying to create interactive plots by using Explore to help demonstrate the effects parameters have on functions. I created one successfully to illustrate shifts and stretches of a polynomial:

transform(A,B,X,H,P,K):=Explore(plot(a*(b*x+h)^(p)+k,x=X),parameters=[a=A, b= B,h=H,p=P,k=K],placement=right)

However when I try to do the same with a solved ODE it returns an error message:

Explore(plot(1/(-p*x+x+1)^(1/(p-1)), x = -5 .. 5), parameters = [p = -20 .. 20], placement = right);

Executing this gives the error message:

Warning, expecting only range variable x in expression 1/((-p*x+x+1)^(1/(p-1))) to be plotted but found name p
INTERFACE_PLOT(AXESLABELS(x, ""),

VIEW(-5. .. 5., DEFAULT, _ATTRIBUTE("source" = "mathdefault"))),

parameters = [p = -20 .. 20], placement = right

I'm not sure why it is having difficulty dealing with "p" when it had no difficulty with the first. Any help would be appreciated!