Dr. David Harrington

758 Reputation

10 Badges

14 years, 266 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a professor of chemistry at the University of Victoria, BC, Canada, where my research areas are electrochemistry and surface science. I have been a user of Maple since about 1992.

MaplePrimes Activity

These are answers submitted by dharr

[Edit: for S, the line

S:= (sqrt(2)/2^k)2*Matrix(M,M, (i,j)-> `if`(`and`(i::odd,j=1) ,-1/(2*i*(i-2)),0)):   

needs the  2 bolded above. Also, the loop you create S in can be discarded, you just need to set M and then the above line does it all]

For C, it's only partly a band matrix, and with many special cases in the first 2x2 block, I'd just make C this way




Following needs to be multiplied by (1/2^k) to give C

CC:=Matrix(M,M,(i,j)->if j=1 and i=1 then 1/2
                   elif i=1 and j=2 then 1/(2*sqrt(2))
                   elif j=1 and i=2 then -1/(8*sqrt(2))
                   elif j=1 and i>2 then -1/(2*sqrt(2)*i*(i-2))
                   elif j=i-1 then -1/(4*(i-2))
                   elif j=i+1 then -1/(4*i)
                   else 0
                   end if);




Download MatrixC.mw

For fractional differentiation in Maple use fracdiff. fracdiff(u(x,t),t,3/2) returns an integral. intsolve solves integral equations but complains this one is not linear, so I'm not sure where to go from here. Perhaps you know some methods for solving these eqns (laplace transforms perhaps?) that you could implement step by step.

Premultiply by the 4x4 matrix with 1's on its reverse diagonal.

Download Matrix.mw

The 1 or 2 means differential with respect to the first or second variable, so [2,2] means with respect to the (unnamed) second variable and then again with respect to that variable. The (x,0) means that the second variable is then set to zero. 


a:=(D[2, 2](T))(x, 0) = 0; b:= (D[1, 1](T))(x, 0) = 0;

(D[2, 2](T))(x, 0) = 0

(D[1, 1](T))(x, 0) = 0


eval(Diff(T(x, t1), t1, t1), {t1 = 0}) = 0

Diff(T(x, 0), x, x) = 0



Download diff.mw

Let e(n) be sequences with n numbers ending in an even number, o(n) be those with n numbers ending in an odd number.

We start with e(1)=2 (0 or 2) and o(n)=1 (1). We can add a 1 to the end of an even or and odd sequence, o(n+1)=e(n)+o(n); we can only add 0 or 2 to the end of an odd sequence, so e(n+1)=2*o(n)


{e(n) = -(2/3)*(-1)^n+(2/3)*2^n, o(n) = (1/3)*(-1)^n+(2/3)*2^n}


proc (n) options operator, arrow; -(1/3)*(-1)^n+(4/3)*2^n end proc


[3, 5, 11, 21, 43, 85]



Download ternary.mw

The variable in LinearSolve means there is a family of solutions, a line, which can be plotted with spacecurve. The planes can be plotted in various ways, e.g. with implicitplot3d


Not sure if I understand what you want. If you right-click and find table properties, you can change the width of the table to be say 50% of the page width. This seems to be respected when you export to .pdf

There is an example on the worksheet of examples referred to on the Explore help page. If I apply it to your example I get


sys := { diff(x(t), t) = alpha*t, x(0)=0 };
sol := dsolve(sys,numeric, 'parameters'=[alpha],'output'='listprocedure'):
caller := proc(a) sol('parameters'=['alpha'=a]); sol end proc:
plotter:=proc(A) plots:-odeplot( caller(A), [t,x(t)], t = 0 .. 1,view=[0..1,0..1.5]) end proc:
Explore( plotter(a),'parameters'=[a=1..3]);

{diff(x(t), t) = alpha*t, x(0) = 0}


(plot doesn't show here)

Download ExploreODE.mw

As @tomleslie points out, this can be done in Maple with (F@@k)(z0). Note that (F@@0)(z0) returns z0 unlike your routine that returns NULL.

Change your last line to fsolve(ss) and you will get a solution.

You don't have an initial value for v1 or H0. And you need := not = after p0 and q0.

You generated a Matrix A with the RandomMatrix command, and then altered its entries in a loop. But for B, you never declared a Matrix (with, say the Matrix command) and so you ended  with a table by default. So just use B:=Matrix(3,3); before the loop.

You can see individual entries of a table such as W by giving the indexed form, say W[1]. To see the contents of the whole table use eval(W)

Works in Maple 2017.3, so maybe you should update your Maple 2017.


`Standard Worksheet Interface, Maple 2017.3, Windows 8.1, September 27 2017 Build ID 1265877`

solve(0.1 = 23.714*(-0.93205)^2/(20.3+61.4*.884^x), x);




Download solve.mw

This is hard to diagnose without the worksheet, which you can upload with the big green up-arrow.

But the [1] in -1.*HFloat(0.0)[1]' suggests it is a problem with using subscripted variables like i[p](t). If you just want p to look nice as a subscript, use i__p(t) (double underline). Maple doesn't alway handle indexed variables i[p] the same as simple variables. If you change those, I think it will work, but will be easier to diagnose.

The immediate problem is that R:=Rser (which assigns Rser to R) should be R=Rser (which compares the two, in the context of an if statement). But also jthen should be then and notice that both R and Rser are locals that do not have values when you do the test in the if statement. For future reference, upload your worksheet using the big green up arrow to make it easier for others to diagnose your problems.

1 2 3 4 5 6 7 Last Page 1 of 18