Maple 13 Questions and Posts

These are Posts and Questions associated with the product, Maple 13

 Any one can help me to solve the differential equations using maple to get the velocities u ,v and pressure p for the problem mentioned below

How do I save these fonts as my default ones?                                

"Maple Input: Arial 24, Red"

and "2D Output: Arial 18, Blue".

I am using Maple 13.

Thank you!

 

Any one can help me to convert matlab codes to maple.Matlab_code.mw
 

%Finite element method code for solving bvp nonlinear ODEs%

% u''+uu'-u=exp(2x), u(0)= 1, u(1)=e     %

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function FEM_Code()

clear all; close all; clc

n=5;                     % NO of element

nn=n+1;                  % No of nodes

lgth=1;                  % Domain length

he=lgth/n;               % lenth of each elemnet

x=[0:he:lgth];           % Data point for independant variable

AC=0.00005;              % Accuracy

F=zeros(nn,1);           % Initialization

F(1)=exp(0); F(nn)=exp(1);  % Boundary conditions

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Direct Iterative process to handle nonlinear problem

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

c=1.0;

count=0;                   % Initializations for count for iterations

tic                        % Time start

while (c>0)

        [F1]=assembly(F,n,he);

          c=0.0;

          for i=1:nn

            if (abs(F(i)-F1(i))>AC)

                 c=c+1;

                 break;

            end

          end

         F=F1;

         count=count+1;

end

  disp('Hence solution=:');

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % Output for prinmary and secondary variables %%%

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  diff=abs(F-exp(x)');

  fprintf('No of element=%d\n',n)

  disp('      x       FEM          Exact       Error')

  disp([x',F,exp(x)',diff])

  fprintf('No of iterations=%d\n',count)

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  %%% Ploting of primary variable %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  

  plot(x,F,'--rs','Linewidth',2)

  xlabel('x')

  ylabel('u(x)')

  title('solution plot to given BVP')

  toc                                % given totlal time

  

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Derivative of element matrix and Assembly%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

function [F1]=assembly(F,n,he)

nn=n+1;

k = zeros(nn,nn);               % Initialization of main Matrix

R = zeros(nn,1);                % Initialization of RHS Matrix

syms x                          % x as symbolic variable

s=[1-x/he,x/he];                % linear shape function

ds=diff(s,x);                   % Differentiations of shape function

lmm =[];

for i=1:n

    lmm=[lmm;[i,i+1]];          % connectvity Matrix

end

for i=1:n

    lm=lmm(i,:);

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%% Generation of Element Matrix k11 and RHS Matrix f1%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    k11=-int(ds'*ds,x,0,he)+(int(s'*ds*s(1),x,0,he)*F(lm(1))...

        +int(s'*ds*s(2),x,0,he)*F(lm(2)))-int(s'*s,x,0,he);

    f1 = int(exp(2*(x+(i-1)*he))*s',x,0,he);

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%% Assembly accroding to connectivity Matrix%%%%%%%%%%%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    

    k(lm,lm) = k(lm,lm) + k11;

    R(lm) = R(lm) + f1;

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Imposing Boundary Conditions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

k(1,:) = 0.0; k(nn,:) = 0.0;

k(1,1) = 1.0; k(nn,nn) = 1.0;

R(1,1) = F(1); R(nn,1) = F(nn);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Solution of equations (F1) %%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

d = k\R;           % better than using inverse k*R

F1 = d;

end

 

    

 

                                

 

 

 

  

        

      

 

 

 

 

 

 


 

Download Matlab_code.mw

i am attaching the codes and file. i will be thankful to you .

How can I activate my maple 13?

I have no activatIon left but installed maple

once

My purchase Code is BNN7VMT4BPFN7ESG

Thank. You 


 

restart

" S3:=proc(psi) [[[cos(psi),-sin(psi),0],[sin(psi),cos(psi),0],[0,0,1]]]:  end  proc ;   S1:=proc(`ϕ`)  [[[1,0,0],[0,cos(`ϕ`),-sin(`ϕ`)],[0,sin(`ϕ`),cos(`ϕ`)]]]:   end proc;"

proc (psi) Matrix(3, 3, {(1, 1) = cos(psi), (1, 2) = -sin(psi), (1, 3) = 0, (2, 1) = sin(psi), (2, 2) = cos(psi), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}) end proc

 

proc (`ϕ`) Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(psi), (2, 3) = -sin(psi), (3, 1) = 0, (3, 2) = sin(psi), (3, 3) = cos(psi)}) end proc

(1)

``

S3(uu)

Matrix([[cos(uu), -sin(uu), 0], [sin(uu), cos(uu), 0], [0, 0, 1]])

(2)

S1(uu)

Matrix([[1, 0, 0], [0, cos(psi), -sin(psi)], [0, sin(psi), cos(psi)]])

(3)

``


 

Download test3.mw

Way i get the wrong output with procedure S1(uu)
 

arrow([u1, u2, u3], shape = cylindrical_arrow, length = sqrt(LinearAlgebra:-Transpose(f0).f0), color = [red, black, green]):

Why i get this error

Error: the number of colours in the COLOUR structure is not sufficient.Error: the number of colours in the COLOUR structure is not sufficient.Error: the number of colours in the COLOUR structure is not sufficient.Error: the number of colours in the COLOUR structure is not sufficient.Error: the number of colours in the COLOUR structure is not sufficient.Error: the number of colours in the COLOUR structure is not sufficient.

I am trying to solve a second order differential equation but getting error. The differential equation valid for r>0.

 

Vr.mw

I am trying to solve system of differential equation as shown in file attached. The differentail eqaution has peicewise function for t=8*n and t not equal to 8*n where n is a positive integer. but i am getting error. please help.

 

 

problem30.mw

Hello everyone! I have just started to using Maple 13. I want to solve complex eauation systems.

When I am working on Maple, If I write simple mathematical calculation and then press right click, the context menu open. However, I want to use solve command. Therefore I wrote an eauation after than press right click the context menu will not open. 

What is the reason of this problem? 

Integral is not evaluated. 

 

PROBLE_13.mw

please I need the code to calculate the convergence order of a multipoint iterative method to solve nonlinear equation systems.

 

my email is: yjmsigma@gmail.com

 

In the first one I used hypergeometric function where the number is converged. Now using the series expansion of hypergeometric function I rewrite the equation as in the 2nd and 3rd case. But here it is not converging. I expect the same answer as in the first case i.e 0.14042. Thank you

 

problem2.mw

In the following problem at two example are given. For Z=2 the sum is converging whereas at Z=4 it is not converging. Thank you

 

PROBLEM.mw

any one can help me to get the output of the plot in 3 rows and 2 columns here is my codes. thanks in advance.

 restart;
  h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
  K1:=((4/h(z)^4)-(sin(alpha)/Gamma2)-h(z)^2+Nb*h(z)^4):
  lambda:=unapply(Int(K1,z=0..1), Gamma2):
  L1:=0.2:
  d1:=0.2:
  alpha:=Pi/6:
  with(plots):
  display
  ( Vector[row]
    ( [ seq
        ( plot
          ( [ seq
              ( eval(lambda(Gamma2), Nb=j),
                j in [0.1,0.2,0.3]
              )
            ],
            delta2=0.02..0.1,
            legend=[Nb=0.1,Nb=0.2,Nb=0.3],
            labels=[typeset(`δ1`), typeset(conjugate(`Δp`))],
            title=typeset("Effect of ", ''alpha'', " when ", Gamma,"2=", Gamma2)
          ),
          Gamma2 in [10,20,30,40,50,-10]
        )
      ]
    )
  );
 

Hellow ,

any body can help me to remove the error from the plot, here is my codes .

Note. 1. *Title {Effect of alpha when 'Gamma2'=Gamma2}

2. *on the y axis i want  bar(deltap)

 

 

 

restart;

 

 

h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
K1:=((4/h(z)^4)-(sin(alpha)/Gamma2)-h(z)^2+Nb*h(z)^4):
lambda:=unapply(Int(K1,z=0..1), Gamma2):
L1:=0.2:
d1:=0.2:
alpha:=Pi/6:
plots:-display(Vector[row]([seq(plot([seq(eval(lambda(Gamma2), Nb=j), j=[0.1,0.2,0.3])], delta2=0.02..0.1, legend=[Nb=0.1,Nb=0.2,Nb=0.3],labels = ["d1 ", "Dp"],labelfont = ["SYMBOL", 12], title=(Effect of alpha when 'Gamma2'=Gamma2)), Gamma2=[10,20,30])]),axes=boxed);
 

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