MaplePrimes Questions

I am now working on differential equations like the following, and wonder how I can deal with diff(C(x,t),x).  In particular, I would like to know the values of diff(C(x,t),x) at specific sets of (x, t).  I also would like to know how to integrate diff(C(x,t),x) for a time period (at x = 0.5L or x = L).

 

restart;

C0 := 10;

K  := 3.0e6;

d  := 5.0E-14;

hm := 5.0E-4;

L  := 0.001;

 

DE1 := diff(C(x, t), t) = d*diff(C(x,t), x, x);

IC := C(x, 0) = piecewise(x < 0, 0, 0 <=x <= L, C0, L < x, 0);

BC1 := D[1](C)(0, t) = 0;

BC2 := -d*D[1](C)(L, t) = hm * C(L, t) / K;

 

pds:=pdsolve(DE1, {IC, BC1, BC2}, type=numeric, spacestep=L/10000, timestep=10000);

 

T := 60*60*24*100;

pds:-plot(t=T, x=0..L);

 

#I tried the following, but these seem to always return zero (while the plot suggests some negative value of diff(C(x, t), x));

v1 := pds:-value(diff(C(x, t), x));

v1(L, T);

v2 := pds:-value(int(diff(C(x, t), x), t = 0 .. T));

v2(L, 0);

Hello all,

I really don't know what is going on with my code but I think I can use some help. I'm new to Maple and to parallel programmimg. What I would to understand is why the following code is simply not working.

 

evList := seq(seq([i,j],j=i..6),i=1..6):
M := Matrix(6,shape=symmetric):
integMult := proc(kIni::integer, kFin::integer)
  local i, j, k, l, kk;
  global evList, M;
  for kk from kIni to kFin do
     i := evList[kk][1]:
     j := evList[kk][2]:
     M[i,j] := Matrix(3*n,(k,l)->evalf(int(expand(N[i][k]*N[j][l]),x[1]=0..a,x[2]=0..b)));
  od:
end proc:
Start(null, Task=[integMult,1,10],Task=[integMult,11,21]);

When I consider one single Thread (i.e. 1 to 21), it works like a charm. But the code written above gives me a kernel lost. I don't know if it is the shared variable "M" (matrices of matrices) or if it is the shared parameter (vector of vectors) , or both. But I've tested duplicating both and nothing different happens.

Can anyone help me?

hi 

i have an equation like thes:

i want to classify Coefficients of F & H like this:

anybody can help me to how i do it?

thank you.

I can solve three equations for x like this

restart:
x := y/p:
z := x*a+y*(1-b):
x := 100*z/(p*r+r);

                            /y a            \
                        100 |--- + y (1 - b)|
                            \ p             /
                   x := ---------------------
                              p r + r      

However, I dont like the fact that x is a function of y. I just want x to be a function of a, b, p and r. So I try to expreses the equations as follows:

restart;
y := p*x;
x := 100*z/(p*r+r);
z := x*a+y*(1-b);
solve(z, x);

Error, recursive assignment
Warning, solving for expressions other than names or functions is not recommended.

Any idea how I can get an equation for x that only depend on a, b, p and r? 
 

Hi there,

I was asked to compute the inverse laplace transform of 
1/s^2 + (e^s - 2)/(s*(e^s-1))

I've tried to evaluate it using online calculators like wolframalpha.However,none of them was able to give an answer.

So,this is what I've got from Maple:

 

I was wondering if it is correct.The graph doesn't look too bad but I've no idea what 1+frac(t) means.Some help would be greatly appreciated,thanks!

p.s.I've loaded the with(inttrans) package

This fails (the code computes the quotient group directly from the definition):

with(GroupTheory):

Qgr := (sgr, gr) -> CustomGroup(LeftCosets(sgr, gr),
  `.` = ((a, b) -> LeftCoset(Representative(a) . Representative(b), sgr)),
  `/` = ((a) -> LeftCoset(Representative(a)^(-1), sgr)),
  `=` = ((a, b) -> Elements(a) = Elements(b)));

gr := QuaternionGroup();
Generators(gr);
                [(1, 2, 3, 4)(5, 6, 8, 7), (1, 5, 3, 8)(2, 7, 4, 6)]

qgr := Qgr(Subgroup({Generators(gr)[1]^2}, gr), gr);
                  qgr := ` < a custom group with 4 generators > `

AreIsomorphic(qgr, DirectProduct(CyclicGroup(2), CyclicGroup(2)));
Error, (in =) invalid keyword expression

If I rename the parameters in the definition of Qgr, e.g., change the last line to

`=` = ((aa, bb) -> Elements(aa) = Elements(bb))

then everything works, AreIsomorphic gives true.

 


 

restart

mu:=0.0025

0.25e-2

(1)

A:=1*10^(-20); Aprim:=4.46*10^(-20);

1/100000000000000000000

 

0.4460000000e-19

(2)

eta:=1.003*10^(-3)

0.1003000000e-2

(3)

V:=2*10^(-9)

1/500000000

(4)

ode:=mu*h(x)*diff(h(x),x,x)+mu*A/(6*pi*h(x)^2)-eta*V

0.25e-2*h(x)*(diff(diff(h(x), x), x))+0.4166666667e-23/(pi*h(x)^2)-0.2006000000e-11

(5)

ode1:=mu*h(x)^3*diff(h(x),x,x)-eta*V*h(x)^2+mu*A/(6*pi)=0

0.25e-2*h(x)^3*(diff(diff(h(x), x), x))-0.2006000000e-11*h(x)^2+0.4166666667e-23/pi = 0

(6)

ic1:=h(0)=3/1000000000, D(h)(-0.20e-4)=0,h(-0.20e-4)=1e-9

h(0) = 3/1000000000, (D(h))(-0.20e-4) = 0, h(-0.20e-4) = 0.1e-8

(7)

dsol1 := dsolve({ic1, ode}, numeric)

Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

 

``


 

Download velocity_tehta1.mwvelocity_tehta1.mw

Hello,

I am facing a problem when trying to simplify those kind of equation: 

((((((((((((((OD &and (NPi &or NEXTotp)) &and &not ((((((((POinoBlaze &and &not (OD &and ((POLYGi1 &and POBIASPdrawing2) &or  (POLYGi1 &and POBIASMdrawing2)))) &or (OD &and (spolyp2 &or spolym2))) &and &not (OD &and ((POLYGi2 &and POBIASPdrawing4) &or (POLYGi2 &and POBIASMdrawing4)))) &or (OD &and (spolyp4 &or spolym4))) &and &not (OD &and ((POLYGi3 &and POBIASPdrawing6) &or (POLYGi3 &and POBIASMdrawing6)))) &or (OD &and (spolyp6 &or spolym6))) &and &not BLACKBOXall) &and &not POLYACTsign)) &and (((BULK &and &not (SUBS1 &and &not MSUB0)) &and &not (NWELi &and &not MKRMSKREG)) &and &not PWbki)) &and &not ((NACTALL0 &and &not  NWRNW) &and &not  PWELL1)) &and &not OD225dg) &and &not OD218dg)  &and &not ((VNPNMSIPW &and &not EMPTY) &or (VNPNMSIPW25 &and &not EMPTY))) &and &not RPOi) &and &not ((NACTALL0 &and PWELL1)  &and  POi)) &and &not (((OD &and (PPi &and &not (SEALRINGi  &and &not PMDMY))) &and &not POi) &and PWELL1)) &and &not VTHNi) &and &not VTLNi) &and ((DCOng &or DCOmsk) &or DCOdg)) &and &not MKRHPA) &and &not EMPTY

When i try to simplify the previous equation by using this methode:

with(Logic);
BooleanSimplify(Equation);

Maple runs in loop and i'm just getting those kind of replys :

    |\^/|     Maple 2016 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2016
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> with(Logic);
        [&and, &iff, &implies, &nand, &nor, &not, &or, &xor, BooleanGraph, BooleanSimplify, Canonicalize, Complement, Contradiction, Dual, Environment, Equivalent, Export, Implies, Import, Normalize, Random, Satisfiable, Satisfy, Tautology, TruthTable, Tseitin]

> BooleanSimplify(((((((((((((((OD &and (NPi &or NEXTotp)) &and &not ((((((((POinoBlaze &and &not (OD &and ((POLYGi1 &and POBIASPdrawing\
> 2) &or  (POLYGi1 &and POBIASMdrawing2)))) &or (OD &and (spolyp2 &or spolym2))) &and &not (OD &and ((POLYGi2 &and POBIASPdrawing4) &or \
> (POLYGi2 &and POBIASMdrawing4)))) &or (OD &and (spolyp4 &or spolym4))) &and &not (OD &and ((POLYGi3 &and POBIASPdrawing6) &or (POLYGi3\
>  &and POBIASMdrawing6)))) &or (OD &and (spolyp6 &or spolym6))) &and &not BLACKBOXall) &and &not POLYACTsign)) &and (((BULK &and &not (\
> SUBS1 &and &not MSUB0)) &and &not (NWELi &and &not MKRMSKREG)) &and &not PWbki)) &and &not ((NACTALL0 &and &not  NWRNW) &and &not  PWE\
> LL1)) &and &not OD225dg) &and &not OD218dg)  &and &not ((VNPNMSIPW &and &not EMPTY) &or (VNPNMSIPW25 &and &not EMPTY))) &and &not RPOi\
> ) &and &not ((NACTALL0 &and PWELL1)  &and  POi)) &and &not (((OD &and (PPi &and &not (SEALRINGi  &and &not PMDMY))) &and &not POi) &and PWELL1)) &and &not VTHNi) &and &not VTLNi) &and ((DCOng &or DCOmsk) &or DCOdg)) &and &not MKRHPA) &and &not EMPTY);
memory used=3.8MB, alloc=40.3MB, time=0.23
memory used=39.0MB, alloc=78.8MB, time=0.89
memory used=96.1MB, alloc=123.9MB, time=2.22
memory used=127.6MB, alloc=411.9MB, time=3.51
memory used=130.5MB, alloc=443.9MB, time=5.71
memory used=136.2MB, alloc=443.9MB, time=7.11
memory used=203.0MB, alloc=475.9MB, time=10.22
memory used=205.5MB, alloc=475.9MB, time=11.71
memory used=326.1MB, alloc=507.9MB, time=14.84

When i delete all the parentheses, everythink work perfectly.

So i assume that when there is too much parentheses dependence maple work not correctly.

Do you have any idea if i'm wrong or not ? Maybe i'm not using the functions correctly ?

Do you have any suggestion on how i should proceed to simplify this equation ?

Thank you for your help.

Dear all,

I get the error "" if I try to plot this:

plot(minimize((s*t)^((s*t)^(s*t))/t^(t^t), t > 0), s = 1 .. 5)

Does anybody know how to get rid of this error? Is it possible/wise to increase the levels of recursion?

Thank you!


 

alias in rtables does not work when typesetting=extended (default in Maple 2017)

restart;

alias(alpha=RootOf(z^3+z+1,z));

alpha

(1)

L:=simplify([seq(alpha^k,k=0..5)]);

[1, alpha, alpha^2, -alpha-1, -alpha*(alpha+1), -alpha^2+alpha+1]

(2)

V:=convert(L,Vector);

_rtable[18446744074335181870]

(3)

interface(typesetting=standard);

extended

(4)

V;

7275930162710271107275012117273962706

(5)

 

This doesn't work directly:

is(RootOf(_Z^3-_Z-1, index = 1)+RootOf(_Z^3-_Z-1, index = 2) = 0);
                                      FAIL

But Maple can compute the bounding interval for a polynomial RootOf (convert(..., RootOf, form=interval)), and evalrC can perform operations on complex intervals:

evalrC(RootOf(_Z^3-_Z-1, index = 1)+RootOf(_Z^3-_Z-1, index = 2));
       INTERVAL(0.6623589782, 0.5622795119, 0.6623589795, 0.5622795122)

evalrC(Re(%));
Error, (in evalrC/INTERVAL) not implemented yet: 4

Re and Im are obviously positive though. Why doesn't Maple try to do that automatically, and also, how do I check if the point is inside the interval? (Without writing my own function to handle real intervals, unions of real intervals, and complex intervals.)

 

With Typesetting level: Extended, INTERVAL displays only the first argument. So evalr(1/INTERVAL(-1 .. 1)) is displayed as INTERVAL(-infinity .. -1), and INTERVAL(-1,-1,1,1) is displayed as INTERVAL(-1).

 

 

I attach a file in which i get an error though it performs.

I made a for do statement which performs perfectly for one loop, but gives an error "unexpected ',' , though performs (i cld not find the errors!).
What does this error state then? How do i remove when I use semicolon to end statement? Can any one help me. Thanks.
 

Data made for Data[i,j] [k] where i =1,2; j=1..8. Each Data has 6 values. k = 1..6

For each data i got an output list of 6 values using a module;

I made a for do statement which performs but gives an error "unexpected ','.

Can any onr help to find my mistake. Thanks.

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.53; BTE := .330; sfc := .253; Data[1, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.88; BTE := .334; sfc := .249; Data[1, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.93; BTE := .334; sfc := .249; Data[1, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.32; BTE := .330; sfc := .253; Data[1, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.71; BTE := .318; sfc := .264; Data[1, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

NULL

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.53; BTE := .380; sfc := .219; Data[2, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.32; BTE := .378; sfc := .221; Data[2, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.71; BTE := .365; sfc := .229; Data[2, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

 

``

Data[1, 8][4]

4.71

(1)

``

``

for i to 2 do for j to 8 do y[i, j] := action1:-Mproc(Data[i, j]); print(Data[i, j], y[i, j]) end do end do

["4S", 3.88, .383, 4.71, .365, .229], ["4S", .4311313490, 0.5411807293e-1, 0.3357509744e-1, .4235561571, 0.6183000001e-1]

(2)

NULL

N1 := NULL; for j to 8 do N1 := N1, Data[1, j][4] end do; print(N1)

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(3)

for i to 2 do N[i] := NULL; for j to 8 do N[i] := N[i], Data[i, j][4] end do end do; print(N[2])

Error, `,` unexpected

 

N[2]

2.36, 2.75, 3.14, 3.53, 3.88, 3.88, 4.32, 4.71

(4)

N[1]

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(5)

``


 

Download Doubt_A_ReactantValues.mw

Doubt_A_ReactantValues.mw

How does one delete an empty cell. I can't see to do that easily, please see the attached for what I am trying to explain.

eq1 := 3*x^2+x+2

``

if 6*x+1 = diff(eq1(x), x) then print(yes) else print(no) end if


 

Download 2.mw

 

 

 

How do you indent your code neatly ? There should be a feature for automatic indentation, the code structure closesly follows python coding style and having it organized would be very helpful.

 

Any advise is appreciated.

First 930 931 932 933 934 935 936 Last Page 932 of 2433