MaplePrimes Questions

Hi,

I'm a beginner in programing with Maple.

Maple has an algorithm "LinearSolve". 

I'm trying - just for fun - to generate an algorithm to solve a linear system of equations according to the Gauss-Jordan-method.

The linear System is given by:

M1*x=b

(in the worksheet: M1 is a matrix, point (1)

b is a vector, point (2) and x is a vector too and is the solution of system, point (3)).

Point (3) is to check - after the generated algorithm points out the solution - if the algorthm is working fine.

The augmented matrix M2 is given by <M1|b>, point (4).

First, I want to generate zeros under the main diagonal of matrix M1 in the augmented matrix M2.

In the worksheet there is my idea to do this, but I get a (perhaps simple) error message ("Error, Invalid if statement termination"). But I don't know what I'm doing wrong...

Perhaps someone can have a look on my idea (link to the file) and give me a hint?

Thanks a lot for your help!!

LGS_Gauss-Jordan.mw

I am working on an Isoperimetric problem.

I have two différential dL and dA. And I am seeking the function y for wich the two différentials are collinear.

So I want "dL/dA=constant"

 

I tried many expression, but I don't know how to express the "= constant"
I tried also (dL/dA)'=0 but no workable answer...

 

Thank's for your help !

Hi!

I have the following problem

> restart:with(plots): Digits := 60:
> A:=42403:
> B:=269.95:
> C:=269.95:
> J1:=0.55:
> J2:=1.02:
> a:=196200:
> b:=14342220:
> c:=1589220:
> k:=157.08/0.0875:
> sys := {A-B*diff(x(t),t)=J1*diff(x(t),t,t)+C*(x(t)-y(t)),k*(J2*diff(y(t),t,t)-C*(x(t)-y(t)))=-(a+b*(diff(y(t),t)^2)/k^2+c*diff(y(t),t,t)),  D(x)(0) = 157.08, D(y)(0)=0, D(y)(10)=157.08,  D(x)(10) = 154.98}:
> dsn1 := dsolve(sys,numeric):
Error, (in dsolve/numeric/BVPSolve) matrix is singular

I would like to extract the unique values of a few sets in a list (L1) and insert them in another list (L2) without the sets.

L1:=[{3,5},{5,4}]:

L2:=[3,5,4]:

Could anyone help me with a bit of code so this works for all values in sets in a list?

 

add(add(1,i=1..j),j=1..4);

10

(1)

S:=%add(%add(1,i=1..j),j=1..4);

%add(%add(1, i = 1 .. j), j = 1 .. 4)

(2)

value(S);

Error, (in value) unable to execute add

 

It seems that the inner add is evaluated prematurely.

 

eval(subs(%add=add, S));  # ok

10

(3)

subs[eval](%add=add, S);  # ?

Error, unable to execute add

 

 

 

A strange fact about filenames. 
Some  filenames containing the "%" character cannot be loaded by Maple.  E.g.  "%add.mw"  or "xx%abyy.mw".  But "xx%yy.mw" is OK.
This happens in Windows, but I suspect that it is not OS related.  It seems that Maple is trying to do some hex manipulations with the filename.

I use the command 'labels = [x, Im(f)]'

to change the labels of my plots, but this time I need to put some "different" characters. i. e., \^{c} (in LaTeX notation).

How can I do this on Maple?

I need a help from someone who knows the GRTensor commands.

How do I write the last two terms of this equation of motion?How do I define Lagrangian matter, too?

My master said that I will do these calculations in the classic worksheet  maple18.

KGmn= (1/2) Tmn + (C0/2) Rabgl Tag Tbl gmn+ 3 C0 Rbrs(mTn)b Tsr – C0 Lm Rab Tab gmn + C0 Rab Tab Tmn+ 2 C0  Lm Rmrns Trs + C0ar(T(mr Tn)s)- C0sr(Tsr Tmn)

Lm =-(1/4) Fmn Fmn 

Hi,

I can’t export a csv file.
The 'export' command returns a numeric value ?QuestionDataExport2.mw

 

How to sketch 3D graph finite string problem of wave equation in partial differential equation using maple?

utt = 4uxx

boundary conditions : u (0,t) = (5,t) = 0 , t>0 ,

initial conditions : u (x,0) = f(x) = { 0, 0<x<4      , (5-x) , 4<x<5 

                         u(x,0) = 0 , 0<x<5

 

how to sketch 3D graph for solution of the corresponding partial differential equations ?? 

I thought in Maple the standard was to use _C1, and _C2, etc... for constants in the solutions returned.

Sometimes Maple mixes _C1 and c[2] in the same result. Is this common, to be expected sometimes and is OK? I noticed this only recently. 

I was thinking may be some part of Maple code still was not updated to use _C1 notation? Here is an example

restart;
pde:=diff(u(x,t),t)+ diff( u(x,t),x )^3 + 6 * u(x,t)* diff(u(x,t),x) = 0;
sol:=pdsolve(pde,u(x,t));

which gives

sol := u(x, t) = -(3/2)*_C1^2+3*(t*_c[2]+x)*_C1-(3/2)*(t*_c[2]+x)^2-(1/6)*_c[2]

With latest Physics updates  268

Is there an option, like AllSolutions used with solve, so that pdsolve would return all solutions to a PDE when it is nonlinear?

I looked at pdsolve help and do not see a HINT that looks like might do this.

For example, this PDE, Maple returns one solution. But Mathematica returns 2 solutions

restart;
pde:= diff(u(x,t),t) = diff(u(x,t),x$5)+10*diff(u(x,t),x$3)*u(x,t)+25*diff(u(x,t),x$2)*diff(u(x,t),x)+
             20*u(x,t)^2*diff(u(x,t),x);
sol:=pdsolve(pde,u(x,t));

#sol := u(x, t) = -12*tanh(176*_C2^5*t+_C2*x+_C1)^2*_C2^2+8*_C2^2

But there is another solution

sol1:=u(x,t)=-(1/2)* _C1^2*(-2 + 3*tanh(x*_C1+ t*_C1^5 + _C2)^2)
pdetest(sol1,pde)
#0

Here is another example. Maple returns one solution and Mathematica 7 solutions

restart;
pde:= diff(u(x,t),t)= u(x,t)*(1-u(x,t))+ diff(u(x,t),x$2);
sol:=pdsolve(pde,u(x,t));

#sol := u(x, t) = (1/4)*tanh(-5*t*(1/12)+(1/12)*sqrt(6)*x+_C1)^2-
              (1/2)*tanh(-5*t*(1/12)+(1/12)*sqrt(6)*x+_C1)+1/4

But there are other solutions

pde = D[u[x, t], t] == u[x, t] (1 - u[x, t]) + D[u[x, t], {x, 2}];
DSolve[pde, u[x, t], {x, t}]

I've tested some (not all) of these 7 solutions in Maple using pdetest and Maple agrees they are solutions:

restart;
pde:= diff(u(x,t),t)= u(x,t)*(1-u(x,t))+ diff(u(x,t),x$2);
sol:=pdsolve(pde,u(x,t));
with(MmaTranslator);
sol2:=FromMma(`-(1/4) (-3 + Tanh[(5 t)/12 - (I x)/(2 Sqrt[6]) - C[3]]) (1 + 
   Tanh[(5 t)/12 - (I x)/(2 Sqrt[6]) - C[3]])`);
pdetest(u(x,t)=sol2,pde);
#0

I tried setting 

       _AllSolutions:=true

But it had no effect. Is there other options?

 

Hi experts,

I want to compute the following formula using Maple but It returns the formula of integration only.

int(sin(x)/(a*b+a^2*sin(x)^2-d^2*cos(x)^2)(c+cos(x)), x = 0 .. x)

Could you please help to give me some suggestion about how to solve it?

Thank a lot.

Hey there,

I'm trying to numerically intergrate a function s(K,i,j) dK using runge kutta over a 2D grid of i,j values. Essentialy, performing the same sort of integral many different times for slightly different combinations of i and j. The function is more or less gaussian, and so the bulk of the result will come from the values of K around the peak of said gaussian. For some combinations of i and j, the function seems to have a singularity on the right edge of the gaussian peak, which causes my script to spit out an error, telling me the calculation cannot be performed further to the right past the singularity. Now, like i said before, the singularity is on the very edge of the gaussian and therefore I am perfectly happy to stop the integration before the singularity, because anything past it wont contribute very much to the result.

How can I use dsolve events to halt my integration just before hitting the singularity?

RK := (i, j) -> dsolve({diff(n(K), K) = K*s(K, a[i], b[j]), n(0) = 0}, numeric, method = rkf45)

 

Hello,

I have this error I'm not sure how to solve

restart;

`assuming`([simplify(int(ln(1+x)^3/(x+a), x = 0 .. 1))], [a > 0]);

combine(expand((eval(%, a = I)+eval(%, a = -I))*(1/2)))

 

What is the precise problem here?

Hello guys, I'm a new user of Maple and I'd love some help.

I'm trying to solve a cubic equation with four variables, and plot the imaginary part of 'w' as a function of 'x' for different values of 'y' and 'z'. When I ask for all the equation roots, the result is huge.

I want to know if there's an "easier" way to select each root of the equation and make it a function without having to "select element" and copy/paste, because I've tried this way and it's not working.

I know this is a stupid question, but I could really use some help.

Thanks for your time!

 

First 735 736 737 738 739 740 741 Last Page 737 of 2426