MaplePrimes Questions

Hello,

I have this problem with pdsolve , I need to know the value of dTf(x,y)/dy, but I knew just the value of Tf 

Pleas find attached the code


 

restart

with(plots); with(ExcelTools); with(Student[Calculus1])

restart

eq := diff(Tf(x, y), x) = diff(Tf(x, y), y, y):

Cl := {1 = Tf(0, y), (D[2](Tf))(x, 0) = 1, (D[2](Tf))(x, 1) = 1};

{1 = Tf(0, y), (D[2](Tf))(x, 0) = 1, (D[2](Tf))(x, 1) = 1}

(1)

pds := pdsolve(eq, Cl, numeric);

_m191894592

(2)

pp := pds:-value(x = 2, output = listprocedure);

[x = 2., y = proc (y) option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; evalf(y) end proc, Tf(x, y) = proc (y) local res, solnproc, outpoint, ndsol; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := trunc(evalhf(Digits)); outpoint := evalf(y); solnproc := proc (outpoint) local indepvals, depvals, vary, ndep, i; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; table( [( "soln_procedures" ) = array( 1 .. 1, [( 1 ) = (18446744073902277486)  ] ) ] ) indepvals := Vector(21, {(1) = .0, (2) = 0.5e-1, (3) = .1, (4) = .15, (5) = .2, (6) = .25, (7) = .3, (8) = .35, (9) = .4, (10) = .45, (11) = .5, (12) = .55, (13) = .6, (14) = .65, (15) = .7, (16) = .75, (17) = .8, (18) = .85, (19) = .9, (20) = .95, (21) = 1.0}, datatype = float[8]); if outpoint = "left" then return indepvals[1] elif outpoint = "right" then return indepvals[21] elif outpoint = "start" then return HFloat(0.0) elif not type(outpoint, 'numeric') then error "non-numeric input" end if; if outpoint < indepvals[1] or indepvals[21] < outpoint then error "requested %1 value must be in the range %2..%3", y, indepvals[1], indepvals[21] end if; depvals := Matrix(21, 1, {(1, 1) = .4999930801471113, (2, 1) = .5499968318884445, (3, 1) = .6000080871124441, (4, 1) = .6499977374209617, (5, 1) = .6999980446183738, (6, 1) = .7500003281451354, (7, 1) = .8000006534468979, (8, 1) = .850000137731867, (9, 1) = .8999998355209465, (10, 1) = .9499998529282891, (11, 1) = .9999999999999913, (12, 1) = 1.0500001470716935, (13, 1) = 1.1000001644790365, (14, 1) = 1.149999862268117, (15, 1) = 1.1999993465530858, (16, 1) = 1.2499996718548485, (17, 1) = 1.3000019553816105, (18, 1) = 1.3500022625790227, (19, 1) = 1.3999919128875402, (20, 1) = 1.4500031681115404, (21, 1) = 1.500006919852874}, datatype = float[8], order = C_order); vary := Vector(2, {(1) = .0, (2) = -0.5e-1}, datatype = float[8]); ndep := 1; if vary[ndep+1]-outpoint <> 0. then `pdsolve/interp1dto0d`(21, indepvals, 1, depvals, false, outpoint, vary); vary[ndep+1] := outpoint end if; [seq(vary[i], i = 1 .. ndep)] end proc; if not type(outpoint, 'numeric') then if member(outpoint, ["start", "left", "right"]) then return solnproc(y) elif outpoint = "solnprocedure" then return eval(solnproc) elif procname <> unknown then return ('procname')(y) else ndsol := pointto(solnproc("soln_procedures")[1]); return ('ndsol')(y) end if end if; try res := solnproc(outpoint); res[1] catch: error  end try end proc]

(3)

``

rhs(op(3, pp))

proc (y) local res, solnproc, outpoint, ndsol; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := trunc(evalhf(Digits)); outpoint := evalf(y); solnproc := proc (outpoint) local indepvals, depvals, vary, ndep, i; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; table( [( "soln_procedures" ) = array( 1 .. 1, [( 1 ) = (18446744073902277486)  ] ) ] ) indepvals := Vector(21, {(1) = .0, (2) = 0.5e-1, (3) = .1, (4) = .15, (5) = .2, (6) = .25, (7) = .3, (8) = .35, (9) = .4, (10) = .45, (11) = .5, (12) = .55, (13) = .6, (14) = .65, (15) = .7, (16) = .75, (17) = .8, (18) = .85, (19) = .9, (20) = .95, (21) = 1.0}, datatype = float[8]); if outpoint = "left" then return indepvals[1] elif outpoint = "right" then return indepvals[21] elif outpoint = "start" then return HFloat(0.0) elif not type(outpoint, 'numeric') then error "non-numeric input" end if; if outpoint < indepvals[1] or indepvals[21] < outpoint then error "requested %1 value must be in the range %2..%3", y, indepvals[1], indepvals[21] end if; depvals := Matrix(21, 1, {(1, 1) = .4999930801471113, (2, 1) = .5499968318884445, (3, 1) = .6000080871124441, (4, 1) = .6499977374209617, (5, 1) = .6999980446183738, (6, 1) = .7500003281451354, (7, 1) = .8000006534468979, (8, 1) = .850000137731867, (9, 1) = .8999998355209465, (10, 1) = .9499998529282891, (11, 1) = .9999999999999913, (12, 1) = 1.0500001470716935, (13, 1) = 1.1000001644790365, (14, 1) = 1.149999862268117, (15, 1) = 1.1999993465530858, (16, 1) = 1.2499996718548485, (17, 1) = 1.3000019553816105, (18, 1) = 1.3500022625790227, (19, 1) = 1.3999919128875402, (20, 1) = 1.4500031681115404, (21, 1) = 1.500006919852874}, datatype = float[8], order = C_order); vary := Vector(2, {(1) = .0, (2) = -0.5e-1}, datatype = float[8]); ndep := 1; if vary[ndep+1]-outpoint <> 0. then `pdsolve/interp1dto0d`(21, indepvals, 1, depvals, false, outpoint, vary); vary[ndep+1] := outpoint end if; [seq(vary[i], i = 1 .. ndep)] end proc; if not type(outpoint, 'numeric') then if member(outpoint, ["start", "left", "right"]) then return solnproc(y) elif outpoint = "solnprocedure" then return eval(solnproc) elif procname <> unknown then return ('procname')(y) else ndsol := pointto(solnproc("soln_procedures")[1]); return ('ndsol')(y) end if end if; try res := solnproc(outpoint); res[1] catch: error  end try end proc

(4)


Thank you

Download mapleprime.mw

I am trying to see if I can run a program looking at the tendency of clustering within groups - basically to see if something occurs within sequential members of a group versus not clustering within the group. I simply wanted to see the indexmax expected tendency to sequentially cluster followed by the probability of exceeding that index max. However, I keep getting the error:  "Error, cannot determine if this expression is true or false: Dmax < 0”. Is there any quick fix to this? 

 

restart;

G = unapply((x-y+1)*X/binomial(x, y)+1-(x-y+1)/binomial(x, y), x, y); PSI := G(3, 2)^10*G(4, 2)^4*G(4, 3)^2*G(5, 2)^2*G(5, 4)*G(5, 3)*G(6, 2)^4*G(7, 3)*G(8, 2)*G(9, 2)*G(9, 3)*G(9, 4)*G(10, 2)^2*G(11, 2)*G(11, 3)*G(12, 3)*G(13, 3)*G(15, 2)^2;

evalf(expand(PSI));

for i from 0 to degree(PSI) do D . i = evalf(coeff(PSI, X, i)) end do; Dmax = 0; for i from 0 to degree(PSI) do if D . i > Dmax then index = i; Dmax = D . i end if end do;

 

Error, cannot determine if this expression is true or false: Dmax < 0

 

mean := sum('i*D . i', 'i' = 1 .. degree(PSI));

indexmax := index;

Proba := sum('D . i', 'i' = 20 .. degree(PSI));

Trying to plot cosxcoshy = 1, I am obtaining close to what i expect to see, but the graph should pass through the origin and maple is plotting it with no defined values for -0.2 < x < 0.2. The line is also not very smooth. This is what i have entered

 implicitplot(cos(x)*cosh(y) = 1, x = -3 .. 3, y = -5 .. 5)

any help would be greatly appreciated

Greetings,

help 

i want to add text with greek letters and english letters on top of the graph with out using title in plot

 

restart:
with(plots):
p1:=plot(sin(2*x), x = -Pi .. Pi):
p2:= textplot(effect of alpha =3,gamma=5 in the flow):
display(p1,p2):
 

 

This is a Wave PDE inside disk. with fixed edge of disk,  and no theta dependency. initial position and velocity  given.

When using "c^2" for the  wave propagation speed, Maple only gives solution when also using assumptions to tell that c is positive.

restart; 
Physics:-Version()[2]; 
`2018, November 28, 1:35 hours, version in the MapleCloud: 224, version installed in this computer: 224`

And the PDE is 

pde := diff(u(r, t), t$2) = c^2*( diff(u(r,t), r$2)  + (1/r)* diff(u(r,t),r)  ) ; 
ic:=u(r,0)=1, eval( diff(u(r,t),t),t=0)=r/3; 
bc:=u(1,t)=0; 
sol:=pdsolve([pde, ic,bc], u(r, t)) assuming t>0;

sol:=()

Now adding assuming c>0, or "c::positive", or "c>=0", it solves it 

restart;
pde := diff(u(r, t), t$2) = c^2*( diff(u(r,t), r$2)  + (1/r)* diff(u(r,t),r)  ) ; 
ic:=u(r,0)=1, eval( diff(u(r,t),t),t=0)=r/3; 
bc:=u(1,t)=0; 
sol:=pdsolve([pde, ic,bc], u(r, t)) assuming t>0,c>=0;

Any idea why the assumption "c>0"  is needed when the speed is given as "c^2" ? I also tried assumption "c::real", but it still did not solve it.   It seems related to Maple using Laplace transform to solve it.

It seems to me the assumption c>0 should not needed here. But if it is, I'd like to learn why.

Maple 2018.2, windows 10

Update

Thanks to comment below

   " so u(r, 0)=1 (for all r), and u(1, t)=0 (for all t). So what is u(1,0)??? "

I should have added "r>0,r<1".  The reason I did not, is that I copied the code to solve this from Mathematica. In Mathematica, it did not need this assumption to solve it. It seems to depend on the method of solution used by Mathematica vs. Maple to cause this difference.

But now I see it helps to have it there. With the above assumption, now, there is no need to do any assumption on "c" at all and it gives solution. adding c>0 or t>0 or c>=0, makes no change now.

restart;
pde := diff(u(r, t), t$2) = c^2*( diff(u(r,t), r$2)  + (1/r)* diff(u(r,t),r)  ) ; 
ic:=u(r,0)=1, eval( diff(u(r,t),t),t=0)=r/3; 
bc:=u(1,t)=0; 
sol:=pdsolve([pde, ic,bc], u(r, t)) assuming t>0,r>0,r<1;

 

 

Hi

https://www.energymatters.com.au/solar-calculators/solar-battery-calculator.php?utm_source=NewsletterMailingList&utm_medium=email&utm_campaign=EM171101CN

I am trying to find how it calculates how much solar will be exported back to the grid. I thought this could only be estimated  empirically, but apparently not.

Anyway, it depends on three factors, power consumption, power installed, and average hours of sun per day, or hours per day as a function of time of year. For C=4.5kWh/day and S=5kW and H=4 sun hrs per day, means 90% will be exported back to the grid Y. So Y(C,S,H)= a closed form expression.

How to guess the fuction? I tried array interpolation for a numeric solution, but it complains: independent coordinates must be sorted in increasing order

law.mw

When you are solving an ode of degree 4 in maple you get an answer like this : f(x)=aZ1(x)+ bZ2(x)+ cZ3(x) + dZ4(x) Now I want to pick Z1 and Z2 and others one by one to form a list. What should I do ? (I have tried to use coeff but it did not work)

Task_1_-_Step_2_-_Attempt_2.mw

Hello, I have two main questions involving the attached file.

1. In the first error, I am trying to put a vector in the exponential, however I am getting an error. Is there any way around this?

2. I am then trying to integrate an OuterProductMatrix, however I am getting another error. Is there another way around this?

Thank you.

 

Is there another way in maple to code `union`. I am not confident using this function and was wondering if there was a perhaps longer/different way to do the same thing?

 

Thanks!

I have the following inequality system : 

              [ U1,2 + U1,3 -1 = 0,

U2,3 - U1,2 = 0, 

-U1,3 -U2,3+1 = 0,

0 <=U1,2,

0 <= U1,3,

0 <= U2,3]

I want to solve it using LinearMultivariateSystem, namely I excuted a command : 

Then the following is return : 

Error, (in Utilities:-SimpleAnd) invalid input: a string/name list is expected for sort method `lexorder`

 I tried that

My question is that how do you use LinearMultivariateSystem for varibles indexed by two params.

Thank you.

 

Hiya

from this

>with(combinat):
>A:=choose([CPC__h, SIZE__h,CPC__m, SIZE__m,CPC__l, SIZE__l],2): 

where h denotes high, m=medium, l=low

I want to select CPC and SIZE all the combinations w.r.t h, m and l

[[CPC__h, SIZE__h], [CPC__h, SIZE__l], [CPC__h, SIZE__m], [CPC__l, SIZE__h], [CPC__l, SIZE__l], [CPC__l, SIZE__m], [CPC__m, SIZE__h], [CPC__m, SIZE__l], [CPC__m, SIZE__m]]

>nops(A)-3

9

I want to apply the methodology to 
choose([CPC__h, SIZE__h, SH__h,CPC__m, SIZE__m, SH__m,CPC__l, SIZE__l, SH__l],3)
 

hi , I want to solve a problem of structural analysis (slope deflection) in maple but .... ?

convert(...,Int) in Maple 2018.2 works for fourier, invfourier, laplace, but does not work for invlaplace.  

Why is that? Is there a workaround?

expr:=fourier(f(x), x, w):
convert(expr,Int);

expr:=invfourier(f(w), w, x):
convert(expr,Int);

expr:=laplace(f(s),s,t):
convert(expr,Int)

expr:=invlaplace(f(s),s,t):
convert(expr,Int)

Was expecting to see the Mellin's inverse formula.

Maple 2018.2 on windows 10

 

In the snip from Maple help: please expaln (a) the meaning, (b) how do I enter e1..-1,2 in the last statement?

Thanks


Hi I am trying to solve the following system of equation. I could solve it for approximate value of s(0)=0.9999 using middefer method of bvp, but as soon as I give the b.c. as s(0)=1, Maple gives me an error that there is an numeric exception. Can someone explain it what is going wrong with s(0)=1? Any sugesstion to solve the equation?
error.mw

b := 1;
r := .1;
l := 3;
a := 10; p := 1.5; ds := 100; dk := 1;

sol3 := dsolve({ds*(diff(i(x), x)) = exp(eta(x)), s(x)^3*i(x)*b*r+(1-s(x))^3*a*l*(diff(s(x), x))/s(x)^1.5 = (1-s(x))^3, diff(eta(x), x) = dk*(i(x)-1)/s(x)^p, i(0) = 0, i(1) = 1, s(0) = 1}, {eta(x), i(x), s(x)}, approxsoln = [eta(x) = .5, i(x) = .5, s(x) = 1], initmesh = 100000, type = numeric, maxmesh = 100000, range = 0 .. 1, output = listprocedure, method = bvp[middefer], abserr = 0.1e-3, adaptive = true);

Error, (in dsolve/numeric/bvp) numeric exception: division by zero


plots[odeplot](sol3, [[x, s(x)]], 0 .. 1, color = ["Green"]);

Thanks and regards,
 

5 6 7 8 9 10 11 Last Page 7 of 1688