MaplePrimes Questions

Hi,

I have a linear system to solve.

 

mm:=proc(a,x,h,i)
local A,Z1,Z2,Z,F,result;  # to declare the local variable
A:=array(1..2,1..2,[[1,1],[a,a+h]]);
Z1:=evalf(int(1/(abs(y-x)+.000000001),y=a..a+h));
Z2:=evalf(int(y/(abs(y-x)+.000000001),y=a..a+h));
Z:=array([Z1,Z2]);
F:=evalm(inverse(A)&*Z);
result:=F[i]
end:

My questions: 

1) My exact Z1 is Z1:=evalf(int(1/(abs(y-x)),y=a..a+h)); but I ask if can I put

Z1:=evalf(int(1/(abs(y-x)+.000000001),y=a..a+h));

the same for Z2.

2) Can I writte in a simple form the vector Z.  Because, later, il have a second system contains Z1,Z2, Z3, Z4,Z5.  The difference between Z1 and Z2 is the variable "y" added in the integral of Z2.

 

Many thinks.

 

I want to create a NxN circulant matrix of a system with fixed boundaries. This is an idea of what I'm trying to do (but it doesn't work):

> N := 8;

> A := Matrix(N, shape = Circulant[[2, VectorCalculus[`-`](1), ZeroVector[row](VectorCalculus[`+`](N, VectorCalculus[`-`](3))), VectorCalculus[`-`](1)]]);

>A[1,N]:=0;

>A[N,1]:=0;

In other words, I want to make a circulant matrix of the elements 2, -1, 0, 0, ..., -1 (with N-3 zeros). Then I want to set the top right and bottom left elements to zero (that's the fixed boundary portion). The first command almost works for N=4 -- except with extra square brackets in the matrix -- but doesn't work for N=8 or 16 (N is always a power of 2). The second and third commands seem to be bad syntax (I haven't really tried to figure them out yet).

Google translate is HTTPS.  Https protocol is not supported in the HTTP package.  I can't seem to get it to work using the Sockets package.

Any ideas?

i will convert matlab code to maple please help me

clc
clc
clear all
E1=181*10^9;
E2=10.30*10^9;
G12=7.17*10^9;
nu_12=0.28;
nu_21=(nu_12*E2)/E1;
fprintf('Please enter a numerical value for Total Height.')
htotal=input('htotal=');
fprintf('Number of entries for ply orientations should equal the number of entries for aspect ratios .','Please enter values separated by spaces in [].')
O(1,:)=input('ORIENTATION=');
fprintf('Please enter values separated by spaces in [] for the Independent Ply Aspect Ratios(=Thickness of each ply/Total Height).')
AR=input('ASPECT-RATIO=');
[ARrows,ARcols] = size(AR(1,:));
[orows,ocols] = size(O(1,:));
if ocols~=ARcols
fprintf('Check Number of Independent Ply Orientation and Aspect Ratio.')
end
plycount = ocols;
k=0;
sumAR = sum(AR);
H = htotal*(AR/sumAR)
% Define matrix with ply orientations as row one and corresponding height
% as row two for beter display
OHmatrix = [O;H]
Z=zeros(1,plycount+1);
hindex = -(htotal)/2 ;
for i=1:plycount+1
if i==1
Z(:,i) = hindex;
else
Z(:,i) = Z(:,i-1)+ H(i-1);
end
end
s11=1/E1;
s12=-nu_12/E1;
s16=0;
s21=s12;
s22=1/E2;
s26=0;
s61=s16;
s62=s26;
s66=1/G12;
S=[s11 s12 s16;s21 s22 s26;s61 s62 s66];
Q11 = E1/(1- nu_12*nu_21);
Q22 = E2/(1- nu_12*nu_21);
Q12 = (nu_21*E1)/(1- nu_12*nu_21);
Q66 = G12;
% note that Q21 = Q12
Qp = [ Q11, Q12 , 0 ;Q12, Q22 , 0 ;0 , 0 , Q66 ];
% Intializing ABD as a 3x3 zero matrix
A = zeros(3,3) ;
B = zeros(3,3) ;
D = zeros(3,3) ;
% Calculating the A, B, D Matrices for each ply
Qp(3,3) = Qp(3,3)*2 ;
for l = 1 : plycount
thetar = (O(l)/180)*pi;
% define "m" and "n" as
m = cos(thetar);
n = sin(thetar);
% 2D Transformation matrix T :
T = [m^2 , n^2 , 2*m*n ;n^2 , m^2 , -2*m*n ;-m*n , m*n , m^2 - n^2 ];
% Correcting for engineering strain-true strain
Q = T\Qp*T ;
Q(:,3) = Q(:,3)*.5 ;
l
Q
for i=1:3
for j=1:3
A(i,j)= A(i,j) + (Q(i,j))*( Z(l+1) - Z(l) );
B(i,j)= B(i,j) + 0.5* ((Q(i,j))*( (Z(l+1))^2 - (Z(l))^2 ));
D(i,j)= D(i,j) + (1/3)*((Q(i,j))*( (Z(l+1))^3 - (Z(l))^3 ));
end
end
for i=1:3
for j=1:3
if abs(A(i,j))< 1.0e-4
A(i,j) = 0;
end
if abs(B(i,j))< 1.0e-4
B(i,j) = 0;
end
if abs(D(i,j))< 1.0e-4
D(i,j) = 0;
end
end
end
end
%Finding AB-BD matrix and its inverse
ABDmatrix = [A B ; B D];
A = ABDmatrix(1:3, 1:3)
B = ABDmatrix(1:3, 4:6)
D = ABDmatrix(4:6, 4:6)


Hi;


I've written a Maple's procedure but when I execute it some warning messages have been displayed as follows:


read "My_Proc.mpl":
Warning, `L` is implicitly declared local to procedure `My_Proc`
Warning, `P` is implicitly declared local to procedure `My_Proc`
Warning, `V` is implicitly declared local to procedure `My_Proc`

So, how can I get rid of such warnings?
Thanks in advance.


I wish to  plot 2D animate for the soltion of this equation here is the code

restart;
with(PDEtools):
with(ArrayTools):
with(plots):

f:=u->sech(u):
g:=v->sech(v):
h:=1/10:
N:=20:
M:=20:
V:=x->x^2:
psi:=Array(0..N/h+1,0..M/h+1):
for i from 0 to N/h do
psi[i,0]:=evalf(f(i*h)):
od:
for j from 0 to M/h do
psi[0,j]:=evalf(g(j*h)):
od:
for i from 1 to N/h do
for j from 1 to M/h do
psi[i,j]:=-psi[i-1, j-1]+(1-(1/8)*h^2*V((1/2)*h*(j-i-1)))*psi[i, j-1]+(1-(1/8)*h^2*V((1/2)*h*(j- i+1)))*psi[i-1,j]:
od:
od:
ls:=[seq([seq([i*h,j*h,psi[i,j]],i=0..N/h)],j=0..M/h)]:

surfdata((ls),axes=boxed,labels=[`u`,`v`,`psi(u,v)`],shading=zhue,style=patchcontour);

Group Theory,

Given a Group G and a normal Subgroup H.

I can get " map(Representative,RightCosets(H,G)) ".

Is ist possible to get the factor group  G/N ?

 

Best regards

 

Kurt Ewald

Hey, 

I am trying to write a single procedure to find the root of any function using the Newton-Raphson method, given the initial approximation and the tolerance. If this fails to converge, the program must then use the Bisection method to find the root. Need some help please. The current procedure i have done is only coming out with the first Iteration 

Thanks for the help!

hi dears. i cant solve this question by Analytical method such variational itteration method (VIM) or homotopy perturbation method (HPM), homotopy analysis method(HAM)

Hello;

Suppose we have a vector as follows:

Plex:=[u,v,w,x,y,z]

Could anyone help me to reproduce the following vectors via a "for" loop?

[ v, u, w, x, y, z]

 [ w, v, u, x, y, z]

 [ x, w, v, u, y, z]

 [ y, x, w, v, u, z]

I have a simple Matlab script which can do what I intend. So, my question is how can I implement this script in Maple?

Plex=[u,v,w,x,y,z]

for i=2:5

    Plex=[Plex(i) Plex];

    Plex(i+1)=[];

    disp(Plex)

end

 

Thanks in advance.

Hello all,

I'm an engineering student working on bicycle shifting. After an dynamic study i encounter the equation:

E:=5.37*theta12(t)=C*(diff(theta12(t),[t$2])+diff(theta10(t),[t$2]))+247.2*[diff(theta10(t),[t$2])*(-6.53*cos(theta12(t))+8.51*sin(theta12(t)))+diff(theta10(t),t)*diff(theta12(t),t)*(6.53*sin(theta12(t))+8.51*cos(theta12(t)))]-247.2*diff(theta10(t),t)*(-diff(theta12(t),t)+diff(theta10(t),t))*(-6,53*sin(theta12(t))-8,51*cos(theta12(t)));


where C is a real constant

More exactly, i would need to find a formule for theta12 using the succesive derivatives of theta10.

I heard that i need to search a numerical solution but,up to now, don't succeed to solve it.

I'm open to all idea.

Thanks

I have low vision, and the default fonts in Maple are too small for me to read.  I can enlarge the normal input and output using the View/Zoom Factor, and this works very well for me.  However, it seems to have no effect on the fonts in spreadsheets.

Can anyone tell my how to make the fonts in Maple spreadsheets larger?  I'm using Maple 18 on Windows 8.1. Thank you.

how to singularize existing function?

any group theory can describe the singularity function?

Hi, My goal is to compute the coefficient beta_i, so i will solve a system and get the coefficient beta_i. But my code return an error. Any help please. Many thinks

coef_approx:=proc(a,N,i,d)
local Fredholm,eq2,eq3,Vct_basis,fct,sys,eq4,M,w,b,M1,V,Vect_beta,h,x,phi,Kernel,lambda;
# Fredholm Integral equation
Fredholm:=phi(x)=f(x)+lambda*int(Kernel(x,y)*phi(y),y=-a..a);
# stepsize
h:=a/N;
# First Approximation of integral
eq2:=int(Kernel(x,y)*phi(y),y=-a..a)=sum(int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h),n=-N..N-d);
#Approximate the integral (Method used)
eq3:=phi->int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(beta[i]*phi((n+i-1)*h),i=1..d+1):
eq4:=int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(alpha[i](n,m)*phi((n+i-1)*h),i=1..d+1);
# Fct used to compute the coeffcient beta[i]
Vct_basis:=[seq(x^i,i=0..d+1)]:
fct:=[seq(unapply(Vct_basis[i],x),i=1..d+2)];
# system of equation must be solved
sys:=[seq(eq3(fct[i]),i=1..d+1)]:
x:='x';
x:=m*h:
w := [seq(beta[i],i=1..d+1)];
M,b := GenerateMatrix(sys,w);
M1:=-M: V:=-b:
Vect_beta:=(M1)^(-1).V:
return Vect_beta;
end proc;

Good day, please how can one solve these BVPs using FINITE DIFFERENCE METHOD in maple. Here is the problem FDM.mw

First 1426 1427 1428 1429 1430 1431 1432 Last Page 1428 of 2434