Alger

489 Reputation

16 Badges

10 years, 174 days

MaplePrimes Activity


These are answers submitted by Alger

implicitplot(x^2 + y^2 = 1, x=-2..2,y=-2..2, rangeasview = true);

Your problem is e^x which must be replaced with exp(x) and then all work

replace K3 with k3

I think the problem is in dsolve when you use output=procedurelist. I don't know why.

I changed to

dsol2 := dsolve(dsys1, numeric, method = rkf45, output = Array([0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]));

It work

The same for

dsol3 := dsolve(dsys1, numeric, method = dverk78, output = Array([60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70]));

it work

b=0 is a parameter and not an equation with no variables

restart:b:=0:Eqs := [x*b = y*b]; Vars := [x, y];

solution := solve(Eqs, Vars);

                                                      solution := [[x = x, y = y]]

 

restart: with(plots): spacecurve({[cos(t),sin(t),t],[cos(t)^2,sin(t)^2,t]},t=0..4*Pi);

inequal({x[1] >= 0, x[2] >= 0, x[1]-3*x[2] >= -3, 2*x[1]+3*x[2] <= 6}, x[1] = 0 .. 3.5, x[2] = 0 .. 2.5, labels = ["x[1] values", "x[2] values"]);

You must introduce your Dirichlet condition into the Matrix A[341,341] and the vector B[341] befor solving the system with LinearSolve.

There are some methods to introduce those type of conditions into A and B.

One methode is to force nodes in diagonal rigidity Matrix A and B with high numbers.

restart: with(plots):sys := diff(x(t),t)=2*x(t)-x(t)*y(t),diff(y(t),t)=-y(t) + 0.4*x(t)*y(t):
> fcns := {x(t), y(t)}:
> p:= dsolve({sys,y(0)=1,x(0)=5},fcns,type=numeric,method=classical):
> odeplot(p, [[t,x(t)],[t,y(t)]],-4..4);

Try this:

restart: printlevel:=0:max1:=60:
q:=1/2:
 
for w1 from 1/27 by 7/27 to 1/2 do

ww:= [seq( [n, add(1/(n+1), k=ceil(  max(0,(q-w1)/(1-w1)*n)  )..floor( min(n, q/(1-w1)*n)  ))], n=1..max1)]:
plot(ww, style=point):
plot(w1/(1-w1),0..max1,color=blue):
print(plots:-display(%,%%)); print(evalf(w1), evalf(1/w1));
end do;

correct.mw

Those type of pde are solved symbolically (not numerically because parameter lambda must be found) as :

restart: with(LinearAlgebra):dsolve(diff(y(x),x,x)+lambda^2*y(x)=0,y(x)): y:=unapply(rhs(%),x);
           y := x -> _C1 sin(lambda x) + _C2 cos(lambda x)

> bc:=[y(0)=0, y(1)=0];

        bc := [_C2 = 0, _C1 sin(lambda) + _C2 cos(lambda) = 0]

> with(linalg):Cco:=genmatrix(bc,[_C1,_C2]);

                            [     0                  1           ]
                 Cco := [                                      ]
                           [sin(lambda)    cos(lambda)]

> Chareqn:=det(Cco)=0;

                     Chareqn := -sin(lambda) = 0

> lambda:=solve(Chareqn,lambda,AllSolutions);

                          lambda := Pi _Z1~

> lambda:=subs(_Z1=n,lambda);
y:=x->sin(n*Pi*x);

Here, the boundary are of type dirichlet.

You can do the same study with newman and mixed boudaries

You can save or export your maple document as an RTF (word document) or Latex or text

You can solve it symbolically as:

restart: with(plots):

dsys1 := diff(y(x), `$`(x, 2))+(lambda*lambda)*y(x) = 0;

bc1 := y(0) = 0, D(y)(0) = 1; # just two boundary conditions are required

dsolve({bc1,dsys1});

Or numerically with assigning a value to lambda as:

lambda:=1: p:=dsolve({bc1,dsys1},numeric); # example with lambda:=1

odeplot(p);

See

?composition

and

restart: with(Student[Precalculus]): f:=x->x^2; g:=x->cos(x); CompositionTutor(f(x), g(x));

3 4 5 6 7 8 9 Page 5 of 9