dharr

Dr. David Harrington

953 Reputation

13 Badges

15 years, 176 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 1990.

MaplePrimes Activity


These are answers submitted by dharr

Not entirely certain I know what you want, but this may be a start.

[Edit: I changed pi (just a symbol) to Pi (the circle constant thing)]

At the beginning I define i to be sqrt(-1) as you want and D to be a regular variable rather than the differential operator.

Maple gives the answer as a sum over roots of a quartic polynomial. To get a simpler formula, you will need to give values to some variables or parhaps tell Maple their signs (using assuming)

Download Linear_System.mw

As well as Joe's corrections, you need to assign to y (y:=1). 
 

r:=proc(x)
    local y;
    if (x=1)
    then    
    y:=1;
    else
        y:=0;
    end if;
    return y
    end proc;    
 

proc (x) local y; if x = 1 then y := 1 else y := 0 end if; return y end proc

h:=proc(x);
    if (x= infinity)
    then    
    return 1 ;
    else
        return 0;
        end if;
    end proc

proc (x) if x = infinity then return 1 else return 0 end if end proc

r(1);r(2);

1

0

h(1);h(infinity);

0

1

 


 

Download ww.mw

 

I suspect you want gcdex(x^9-a, b*x^6-c, x); but the answer is 1. You may need to specify the numerical value of more of the coefficients.

Try

T := unapply('fsolve'(m(t, c) = -1, t = 0 .. (1/2)*Pi), c, numeric);

In general use unapply to make functions from expressions earlier in the worksheet. The numeric option means that plot and other functions evaluated with a symbolic value will not throw an error.

So the constant _C3 means another condition is required. Presumably you want the solution to drop off at y=infinity.

pdetest suggests your solution does not solve the pde.
 

Download pde.mw

Use := to assign the right-hand side to the left. Some other issues also:

v:= <1 |1| 0>;
w:=<1,1,0>;
M:=<1, 2, 3; 5, 4, 3; 7, 9, 0>;
c:=v.M;
d:=M.w;

v := Vector[row](3, {(1) = 1, (2) = 1, (3) = 0})

w := Vector(3, {(1) = 1, (2) = 1, (3) = 0})

M := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 2, (1, 3) = 3, (2, 1) = 5, (2, 2) = 4, (2, 3) = 3, (3, 1) = 7, (3, 2) = 9, (3, 3) = 0})

c := Vector[row](3, {(1) = 6, (2) = 6, (3) = 6})

d := Vector(3, {(1) = 3, (2) = 9, (3) = 16})

 


 

Download vectors.mw

Try entering in 1D Maple input, e.g. at a > prompt use ctrl-M then `&le;`

You will see that `&le;` is rendered as less-than-or-equals, as it would be in HTML.

Changes in red.
 

 RK2skritt:=proc(FR::procedure,xo,yo,vxo,vyo,h)
 local x, y, vx, vy, r, kx1, kx2, kx3, kx4, ky1, ky2, ky3, ky4, lx1, lx2, lx3, lx4, ly1, ly2, ly3, ly4, tmp;
 r:=sqrt(xo*xo+yo*yo);
 tmp:=-(h*FR(r))/(r);
 lx1:=h*vxo;
 ly1:=h*vyo;
 kx1:=tmp*xo;
 ky1:=tmp*yo;
 lx2:=h*(vxo+0.5*kx1);
 ly2:=h*(vyo+0.5*ky1);
 r:=sqrt((xo+0.5*lx1)^(2)+(yo+0.5*ly1)^(2));
 tmp:=-(h*FR(r))/(r);
 kx2:=tmp*(xo+0.5*lx1);
 ky2:=tmp*(yo+0.5*ly1);
 lx3:=h*(vxo+0.5*kx2);
 ly3:=h*(vyo+0.5*ky2);
 r:=sqrt((xo+0.5*lx2)^(2)+(yo+0.5*ly2)^(2));
 tmp:=-(h*FR(r))/(r);
 kx3:=tmp*(xo+0.5*lx2);
 ky3:=tmp*(yo+0.5*ly2);
 lx4:=h*(vxo+kx3);
 ly4:=h*(vyo+ky3);
 r:=sqrt((xo+lx3)^(2)+(yo+ly3)^(2));
 tmp:=-(h*FR(r))/(r);
 kx4:=tmp*(xo+lx3);
 ky4:=tmp*(yo+ly3);  #edit - one more here
 x:=xo+(lx1+2*lx2+2*lx3+lx4)/(6);
 y:=yo+(ly1+2*ly2+2*ly3+ly4)/(6);
 vx:=vxo+(kx1+2*kx2+2*kx3+kx4)/(6);
 vy:=vyo+(ky1+2*ky2+2*ky3+ky4)/(6);
 [x,y,vx,vy]; end proc:

 

 

Download proc.mw

There is a missing *. The differentiation works in Maple 2017.
 

Download Diff.mw

 

 

restart

Case 1

de1:=diff(U(x),x,x)=0;
bc1:=U(0)=10,U(L)=20;
ans1:=dsolve({de1,bc1},U(x));

diff(diff(U(x), x), x) = 0

U(0) = 10, U(L) = 20

U(x) = 10*x/L+10

Case 2

de2:=diff(U(x),x,x)=-x^2;
bc2:=U(0)=T,D(U)(L)=0;
ans2:=dsolve({de2,bc2},U(x));

diff(diff(U(x), x), x) = -x^2

U(0) = T, (D(U))(L) = 0

U(x) = -(1/12)*x^4+(1/3)*L^3*x+T

 

 


 

Download rod.mw

Like this?

NULL

restart

n := 4; C := proc (K) options operator, arrow; Vector([seq(cos(2*Pi*K*l/n), l = 0 .. n-1)]) end proc; S := proc (K) options operator, arrow; Vector([seq(sin(2*Pi*K*l/n), l = 0 .. n-1)]) end proc

4

proc (K) options operator, arrow; Vector([seq(cos(2*Pi*K*l/n), l = 0 .. n-1)]) end proc

proc (K) options operator, arrow; Vector([seq(sin(2*Pi*K*l/n), l = 0 .. n-1)]) end proc

C(2); S(3)

Vector[column]([[1], [-1], [1], [-1]])

Vector[column]([[0], [-1], [0], [1]])

These two are orthogonal

C(2).S(3)

0

C(2).C(2)

4

 

NULL


 

Download orthogonal.mw

I did G11; the others are similar

Transfer_function.mw

In the File Menu under Document Properties, you should have an attribute named Active which is false for a regular help page and true for an active worksheet.

in 1D input:

ode:=diff(y(x),x,x)=2*y(x)+1;
dsolve(ode);
 

does work, so this is probably incorrect entry of the derivative in 2-D math. [Edit: actually the error message confirms this.] Use the right-click menu 2-D math/convert to 1D math input and see if it looks like the above. If not, use 1-D input (ctrl-M) before the input, or use the expression palette for the derivative and use "^" to raise the powers of 2.

I don't understand exactly what you mean - if you want real-only frequency domain, you need the time domain array to have the real part  symmetric about the centre and the imaginary part antisymmetric about the centre.

Edit: And here is a complex example that works pretty much as I would expect:

restart;

with(DiscreteTransforms):

N:=2^10;df:=.2;dt:=1/df;T1:=500.;

1024

.2

5.000000000

500.

tvec:=Vector(N,i->i*dt):
fvec:=Vector(N,i->i*df):

fidr:=Vector(N,i->cos(2*Pi*df*i)*exp(-dt*i/T1)):
fidi:=Vector(N,i->sin(2*Pi*df*i)*exp(-dt*i/T1)):
fid:=fidr+I*fidi:

plot(tvec,fidr);

spec:=FourierTransform(fid):

plot(fvec,map(abs,spec)); #magnitude

plot(fvec,map(Im,spec));  #imaginary part

plot(fvec,map(Re,spec));  #real part

 


 

Download fid.mw

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