MaplePrimes Questions

I 'm solving asystem of equations and one of the result are Hfloat what does it means and how i convert it to number???

Hi,

 

I am trying to make Maple replace some expressions with variables so that I'll be able to get the coefficients of the resulting polynomial. 

I have the following piece of code:

h := map(proc(x) convert(x,parfrac,s,complex) end proc,convert(f,parfrac,t,complex));

for sub_var in subs do
               h:=applyrule(sub_var[1]=1/sub_var[2],h);

end do;

subs is a list automatically generated in a different procedure, here is a sample list:

[[t-3*I, a1], [t+3*I, b1], [s-3*I, c1], [s+3*I, d1], [t-.4948716594-.4285714286*I, a2], [t-.4948716594+.4285714286*I, b2], [s-.4948716594-.4285714286*I, c2], [s-.4948716594+.4285714286*I, d2], [t+.4948716594-.4285714286*I, a3], [t+.4948716594+.4285714286*I, b3], [s+.4948716594-.4285714286*I, c3], [s+.4948716594+.4285714286*I, d3]]

f is a rational function that breaks up nicely into partial fraction due to theoretical reasons. here is a sample:
f: = (1/2)*(3969*I)*(35*s^3*t^3+21*s^3*t-9*s^2*t^2+21*s*t^3+45*s^2+63*s*t+45*t^2+27)*(t^2+1)*(s^2+1)/(((27*I)*t^2+7*t^3-9*I-21*t)*((27*I)*s^2-7*s^3-9*I+21*s)*((27*I)*s^2+7*s^3-9*I-21*s)*((27*I)*t^2-7*t^3-9*I+21*t))
These particular samples have algebraic numbers in them. and that makes apply rule fail, it seems to only work if the numbers are rational. Any idea on how can I fix that? Alternatively, replace applyrule all together with something that actually works?

Thanks

Dear Maple users, m

I am willing to convert a Matlab text into Maple and create a Maple procedure that can compute the same, but since I never used Matlab I have no idea of the input.

I used the: Matlab[FromMFile]("covMarket.m", "mapleout.mpl"); to convert. But there is nothing converted actually, 

So I am wondering, can anybody help converting it and posting the converted maple text into the answers? If there are lots of work to be done, please at least show me what to do. Thanks in advance

Below is the Ledoit and Wolf, shrinkage estimator script in Matlab:

function [sigma,shrinkage]=covMarket(x,shrink)

% function sigma=covmarket(x)
% x (t*n): t iid observations on n random variables
% sigma (n*n): invertible covariance matrix estimator
%
% This estimator is a weighted average of the sample
% covariance matrix and a "prior" or "shrinkage target".
% Here, the prior is given by a one-factor model.
% The factor is equal to the cross-sectional average
% of all the random variables.

% The notation follows Ledoit and Wolf (2003)
% This version: 04/2014

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file is released under the BSD 2-clause license.

% Copyright (c) 2014, Olivier Ledoit and Michael Wolf 
% All rights reserved.

% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:

% 1. Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.

% 2. Redistributions in binary form must reproduce the above copyright
% notice, this list of conditions and the following disclaimer in the
% documentation and/or other materials provided with the distribution.

% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
% IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
% PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
% EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
% PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
% LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
% NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% de-mean returns
t=size(x,1);
n=size(x,2);
meanx=mean(x);
x=x-meanx(ones(t,1),:);
xmkt=mean(x')';

sample=cov([x xmkt])*(t-1)/t;
covmkt=sample(1:n,n+1);
varmkt=sample(n+1,n+1);
sample(:,n+1)=[];
sample(n+1,:)=[];
prior=covmkt*covmkt'./varmkt;
prior(logical(eye(n)))=diag(sample);

if (nargin < 2 | shrink == -1) % compute shrinkage parameters
  c=norm(sample-prior,'fro')^2;
  y=x.^2;
  p=1/t*sum(sum(y'*y))-sum(sum(sample.^2));
  % r is divided into diagonal
  % and off-diagonal terms, and the off-diagonal term
  % is itself divided into smaller terms 
  rdiag=1/t*sum(sum(y.^2))-sum(diag(sample).^2);
  z=x.*xmkt(:,ones(1,n));
  v1=1/t*y'*z-covmkt(:,ones(1,n)).*sample;
  roff1=sum(sum(v1.*covmkt(:,ones(1,n))'))/varmkt...
      -sum(diag(v1).*covmkt)/varmkt;
  v3=1/t*z'*z-varmkt*sample;
  roff3=sum(sum(v3.*(covmkt*covmkt')))/varmkt^2 ...
      -sum(diag(v3).*covmkt.^2)/varmkt^2;
  roff=2*roff1-roff3;
  r=rdiag+roff;
  % compute shrinkage constant
  k=(p-r)/c;
  shrinkage=max(0,min(1,k/t))
else % use specified number
  shrinkage = shrink;
end

% compute the estimator
sigma=shrinkage*prior+(1-shrinkage)*sample;


 

how to find skin friction value below code

 

restart

PDEtools[declare]((U, W, T, C)(y), prime = y):

R1 := .1; R0 := .1; m := .1; a := .1; Ha := .1; Nt := .1; Nb := .1; Pr := 6.2; Le := .6; Bi := 1; Ec := .1; k := 1; r := .1; A := 1;

sys := diff(U(y), `$`(y, 2))+(R1*(diff(U(y), y))-2*R0*W(y))*exp(a*T(y))-a*(diff(U(y), y))*(diff(T(y), y))-Ha = 0, diff(W(y), `$`(y, 2))+(R1*(diff(W(y), y))+2*R0*U(y))*exp(a*T(y))-a*(diff(W(y), y)) = 0, diff(T(y), `$`(y, 2))+R1*Pr*(diff(T(y), y))+Pr*Ec*exp(-a*T(y))*((diff(U(y), y))*(diff(U(y), y))+(diff(W(y), y))*(diff(W(y), y)))+Pr*Ha*Ec*((U(y)+m*W(y))*(U(y)+m*W(y))+(W(y)-m*U(y))*(W(y)-m*U(y)))/(m^2+1)^2+Nb*(diff(T(y), y))*(diff(C(y), y))+Nt*(diff(T(y), y))*(diff(T(y), y)) = 0, diff(C(y), `$`(y, 2))+Pr*Le*R1*(diff(C(y), y))+Nt*(diff(C(y), `$`(y, 2)))/Nb = 0:

ba := {sys, C(0) = 0, C(1) = 1, T(1) = 0, U(0) = 0, U(1) = 0, W(0) = 0, W(1) = 0, (D(T))(0) = Bi*(T(0)-1)}:

r1 := dsolve(ba, numeric, output = Array([0., 0.5e-1, .10, .15, .20, .25, .30, .35, .40, .45, .50, .55, .60, .65, .70, .75, .80, .85, .90, .95, 1.00])):

with(plots); 

p1u := odeplot(r1, [y, U(y)], 0 .. 1, numpoints = 100, labels = ["y", "U"], style = line, color = green); 

plots[display]({p1u})

In the original worksheet that these were produced, upon closing the within set brackets they do not reduce to the unique elements. But in copying the output to a new worksheet as shown, they do reduce.


 

{Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = -1, (2, 2) = 1, (2, 3) = 0, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = -1, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = -1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 2})}

{Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = -1, (2, 2) = 1, (2, 3) = 0, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = -1, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = -1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 2})}

(1)

restart; with(LinearAlgebra)

{Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = -1, (2, 2) = 1, (2, 3) = 0, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = -1, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = -1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 2})}

{Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = -1, (2, 2) = 1, (2, 3) = 0, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = -1, (3, 2) = 0, (3, 3) = -2}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = -1, (3, 3) = -1}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 2})}

(2)

``


 

Download JESUS_MATRIX.mw

I am attempting to find the surface area of a Torus. I can create a graph very easily, but am struggling with the SurfaceArea command. The code reads so far:

(Inputting the given function for the torus):

> r := (phi,theta) -> <(cos(phi)+3)*cos(theta),(cos(phi)+3)*sin(theta),sin(phi)>:

'r(phi,theta)' = r(phi,theta); 

(Generating a graph of the torus):

>plot3d(r(phi,theta),phi=0..2*Pi,theta=0..2*Pi,scaling=constrained);

(SurfaceArea command):

>SurfaceArea(r(phi,theta),phi=0..2*pi,theta=0..2*pi);

 

I am very new to the program so the solution may be obvious. Any suggestions on how to go about it?

Hello, I am attempting to plot a vector field in Maple. I have the following code so far:

 

SetCoordinates('cartesian'[x,y,z]):

F := VectorField(<y*z*e^(x*y*z)+3*x^(2),x*z*e^(x*y*z)+2*y*z+cos(y),x*y*e^(x*y*z)+y^(2)+1>);

 

I am struggling with the fieldplot3d commands, as I am supposed to plot it in the box -1<=x,y,z<=1. How do I go about inserting these bounds?

 

I am not very familiar with maple.

Kindly help me fix the error.

I want to solve the three equations- eq1, eq2 and eq3 simultaneously by equating to zero, i.e., 

eq1= eq2= eq3= 0, to find the values of the 3 variables t[1], t[2], xi

 

Please help me out with this. It is urgent. 
FINAL2.mw


 

A := 2500;

2500

(1)

alpha := 4

4

(2)

beta := 0.2e-1

0.2e-1

(3)

c := 5

5

(4)

x[w] := 10

10

(5)

x[1] := 8

8

(6)

delta := 5

5

(7)

t[d] := .5

.5

(8)

a := 20

20

(9)

b := 25

25

(10)

theta := .5

.5

(11)

m := theta*(1-exp(-.5*xi))

.5-.5*exp(-.5*xi)

(12)

TC(t[1], t[2], xi) := (A+alpha*((1/2)*a*t[d]^2+(1/3)*a*t[d]^3)+beta*((1/6)*a*t[d]^3+(1/8)*a*t[d]^4)+t[d]*(a/(theta-m)+b*(t[d]-1/(theta-m))/(theta-m)-exp((theta-m)*(t[1]-t[d]))*(a/(theta-m)+b*(t[1]-1/(theta-m))/(theta-m)))-a*(-6*beta*b-(6*(theta-m))*(-a*beta+alpha*b)+6*(theta-m)^2*(a*beta*t[1]+alpha*b*t[d])+3*b*beta*(theta-m)^2*(-t[1]^2+t[d]^2)+6*a*alpha*(theta-m)^2+2*b*beta*(theta-m)^3*(t[1]^3-t[d]^3)+3*a*beta*(theta-m)^3*(t[1]^2-t[d]^2)+3*b*alpha*(theta-m)^3*(t[1]^2-t[d]^2)+6*a*alpha*(theta-m)^3*(t[1]-t[d])+6*exp((theta-m)*(t[1]-t[d]))*((6*(theta-m))*(-a*beta+alpha*b)-6*b*beta*(theta-m)*(t[1]-t[d])-6*((theta-m)^2*(-b*beta*t[1]*t[d]+a*beta*t[d]+alpha*b*t[1]+a*alpha)+beta*b)))/(6*(theta-m)^4)+x[1]*(2*a*t[2]*delta^2+2*b*t[1]*t[2].(delta^2)+b*t[2]*delta-2*a*delta*ln(delta*t[2]+1)-2*b*ln(delta*t[2]+1)-2*b*t[1]*delta*ln(delta*t[2]+1)-2*b*t[2]*delta*ln(delta*t[2]+1)+2*b*t[2]*delta)/(2*delta^2)+x[w]*(2*a*t[2]*delta^2+b*t[2]^2*delta^2+2*b*t[1]*t[2].(delta^2)+2*a*delta*t[2]+2*b*t[2]*delta*ln(1/(delta*t[2]+1))+2*b*ln(1/(delta*t[2]+1))+2*a*delta*ln(1/(delta*t[2]+1))+2*b*t[1]*delta*ln(1/(delta*t[2]+1)))/(2*delta^3)+c*(a*t[d]+(1/2)*b*t[d]^3+a/(theta-m)+b*(t[d]-1/(theta-m))/(theta-m)-exp((theta-m)*(t[1]-t[d]))*(a/(theta-m)+b*(t[1]-1/(theta-m))/(theta-m))-a*ln(1/(delta*t[2]+1))/delta-b*(1+delta*(t[1]+t[2]))*ln(delta*t[2]+1)/delta^2-b*t[2]/delta))/(t[1]+t[2])

(2571.157291+220.0000000/exp(-.5*xi)+275.0000000*(.5-2.000000000/exp(-.5*xi))/exp(-.5*xi)-5.5*exp(.5*exp(-.5*xi)*(t[1]-.5))*(40.00000000/exp(-.5*xi)+50.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi))-53.33333334*(-3.00-298.800*exp(-.5*xi)+1.50*(exp(-.5*xi))^2*(.40*t[1]+50.0)+.3750*(exp(-.5*xi))^2*(-t[1]^2+.25)+120.00*(exp(-.5*xi))^2+.12500*(exp(-.5*xi))^3*(t[1]^3-.125)+37.65000*(exp(-.5*xi))^3*(t[1]^2-.25)+60.000*(exp(-.5*xi))^3*(t[1]-.5)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00))/(exp(-.5*xi))^4+243*t[2]+250*t[1]*t[2]-40*ln(5*t[2]+1)-40*t[1]*ln(5*t[2]+1)-40*t[2]*ln(5*t[2]+1)+25*t[2]^2+10*t[2]*ln(1/(5*t[2]+1))-10*ln(1/(5*t[2]+1))+10*t[1]*ln(1/(5*t[2]+1))-5*(1+5*t[1]+5*t[2])*ln(5*t[2]+1))/(t[1]+t[2])

(13)

``

``

eq1 := diff(TC(t[1], t[2], xi), t[1]) = 0

-(2571.157291+220.0000000/exp(-.5*xi)+275.0000000*(.5-2.000000000/exp(-.5*xi))/exp(-.5*xi)-5.5*exp(.5*exp(-.5*xi)*(t[1]-.5))*(40.00000000/exp(-.5*xi)+50.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi))-53.33333334*(-3.00-298.800*exp(-.5*xi)+1.50*(exp(-.5*xi))^2*(.40*t[1]+50.0)+.3750*(exp(-.5*xi))^2*(-t[1]^2+.25)+120.00*(exp(-.5*xi))^2+.12500*(exp(-.5*xi))^3*(t[1]^3-.125)+37.65000*(exp(-.5*xi))^3*(t[1]^2-.25)+60.000*(exp(-.5*xi))^3*(t[1]-.5)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00))/(exp(-.5*xi))^4+243*t[2]+250*t[1]*t[2]-40*ln(5*t[2]+1)-40*t[1]*ln(5*t[2]+1)-40*t[2]*ln(5*t[2]+1)+25*t[2]^2+10*t[2]*ln(1/(5*t[2]+1))-10*ln(1/(5*t[2]+1))+10*t[1]*ln(1/(5*t[2]+1))-5*(1+5*t[1]+5*t[2])*ln(5*t[2]+1))/(t[1]+t[2])^2+(-2.75*exp(-.5*xi)*exp(.5*exp(-.5*xi)*(t[1]-.5))*(40.00000000/exp(-.5*xi)+50.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi))-275.0000000*exp(.5*exp(-.5*xi)*(t[1]-.5))/exp(-.5*xi)-53.33333334*(.6000*(exp(-.5*xi))^2-.7500*(exp(-.5*xi))^2*t[1]+.37500*(exp(-.5*xi))^3*t[1]^2+75.30000*(exp(-.5*xi))^3*t[1]+60.000*(exp(-.5*xi))^3+3.0*exp(-.5*xi)*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(-1.500*exp(-.5*xi)-149.62500*(exp(-.5*xi))^2))/(exp(-.5*xi))^4+250*t[2]-65*ln(5*t[2]+1)+10*ln(1/(5*t[2]+1)))/(t[1]+t[2]) = 0

(14)

eq2 := diff(TC(t[1], t[2], xi), t[2]) = 0

-(2571.157291+220.0000000/exp(-.5*xi)+275.0000000*(.5-2.000000000/exp(-.5*xi))/exp(-.5*xi)-5.5*exp(.5*exp(-.5*xi)*(t[1]-.5))*(40.00000000/exp(-.5*xi)+50.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi))-53.33333334*(-3.00-298.800*exp(-.5*xi)+1.50*(exp(-.5*xi))^2*(.40*t[1]+50.0)+.3750*(exp(-.5*xi))^2*(-t[1]^2+.25)+120.00*(exp(-.5*xi))^2+.12500*(exp(-.5*xi))^3*(t[1]^3-.125)+37.65000*(exp(-.5*xi))^3*(t[1]^2-.25)+60.000*(exp(-.5*xi))^3*(t[1]-.5)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00))/(exp(-.5*xi))^4+243*t[2]+250*t[1]*t[2]-40*ln(5*t[2]+1)-40*t[1]*ln(5*t[2]+1)-40*t[2]*ln(5*t[2]+1)+25*t[2]^2+10*t[2]*ln(1/(5*t[2]+1))-10*ln(1/(5*t[2]+1))+10*t[1]*ln(1/(5*t[2]+1))-5*(1+5*t[1]+5*t[2])*ln(5*t[2]+1))/(t[1]+t[2])^2+(243+250*t[1]-150/(5*t[2]+1)-250*t[1]/(5*t[2]+1)-65*ln(5*t[2]+1)-250*t[2]/(5*t[2]+1)+50*t[2]+10*ln(1/(5*t[2]+1))-25*(1+5*t[1]+5*t[2])/(5*t[2]+1))/(t[1]+t[2]) = 0

(15)

eq3 := diff(TC(t[1], t[2], xi), xi) = 0

(110.0000000/exp(-.5*xi)+137.5000000*(.5-2.000000000/exp(-.5*xi))/exp(-.5*xi)-275.0000000/(exp(-.5*xi))^2+1.375*exp(-.5*xi)*(t[1]-.5)*exp(.5*exp(-.5*xi)*(t[1]-.5))*(40.00000000/exp(-.5*xi)+50.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi))-5.5*exp(.5*exp(-.5*xi)*(t[1]-.5))*(20.00000000/exp(-.5*xi)+25.00000000*(t[1]-2.000000000/exp(-.5*xi))/exp(-.5*xi)-50.00000000/(exp(-.5*xi))^2)-106.6666667*(-3.00-298.800*exp(-.5*xi)+1.50*(exp(-.5*xi))^2*(.40*t[1]+50.0)+.3750*(exp(-.5*xi))^2*(-t[1]^2+.25)+120.00*(exp(-.5*xi))^2+.12500*(exp(-.5*xi))^3*(t[1]^3-.125)+37.65000*(exp(-.5*xi))^3*(t[1]^2-.25)+60.000*(exp(-.5*xi))^3*(t[1]-.5)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00))/(exp(-.5*xi))^4-53.33333334*(149.4000*exp(-.5*xi)-1.500*(exp(-.5*xi))^2*(.40*t[1]+50.0)-.37500*(exp(-.5*xi))^2*(-t[1]^2+.25)-120.000*(exp(-.5*xi))^2-.187500*(exp(-.5*xi))^3*(t[1]^3-.125)-56.475000*(exp(-.5*xi))^3*(t[1]^2-.25)-90.0000*(exp(-.5*xi))^3*(t[1]-.5)-1.50*exp(-.5*xi)*(t[1]-.5)*exp(.5*exp(-.5*xi)*(t[1]-.5))*(298.800*exp(-.5*xi)-1.500*exp(-.5*xi)*(t[1]-.5)-1.50*(exp(-.5*xi))^2*(99.750*t[1]+80.200)-3.00)+6*exp(.5*exp(-.5*xi)*(t[1]-.5))*(-149.4000*exp(-.5*xi)+.7500*exp(-.5*xi)*(t[1]-.5)+1.500*(exp(-.5*xi))^2*(99.750*t[1]+80.200)))/(exp(-.5*xi))^4)/(t[1]+t[2]) = 0

(16)

``       

solve({eq1, eq2, eq3}, {xi, t[1], t[2]})

Warning, solutions may have been lost

 

 

``

``

``

 

``

``

``

``

 

 

 

``

solve({eq1, eq2, eq3}, {xi, t[1], t[2]});

Warning, solutions may have been lost
 

Download FINAL2.mw


           

Hi guys

I'm trying to solve this equation

eqns := {(1-sin(b_u)*sin(s)/(cos(b_u-y_f)*cos(s-y_f)))*(1/cos(s-y_f)^2-1/sin(s)^2) = -(cot(s)+tan(s-y_f)+Z)*sin(b_u)*(cos(s)/cos(s-y_f)+sin(s)*sin(s-y_f)/cos(s-y_f)^2)/cos(b_u-y_f)}

where

b_u = 1/tan(0.8)
Z = 892/(27417000*f_z)
y_f = 9*Pi/180

I have a bondary condition where s=s_0 and s_0 = (1/4)*Pi-1/2*(b_u-y_f)

And i want to solve this nonlinear equation from f_z=0.00005 to f_z=0.0005 by interval 0.000001 interval

I have tryed using this topic as an example

https://www.mapleprimes.com/questions/200995-Solve-By-Newton-Raphson-Method

But in the final i'm surprised with the error "Error, (in fsolve) initial approximation does not evaluate to float"

Could someone help me please.
Thanks

Hi

I have the following piecewise function in Maple:

sigmaP:=piecewise(u < -1,-1,u >1,1,u);

Now we can plot this function:

plot(sigmaP,u=-5..5,size=[1200,300],gridlines,discont=[showremovable]);

Next, I define a new piecewise  function as

sigmaF:=u->piecewise(u < -1,-1,u >1,1,u);

and I use this function in 

Fun:=proc(x1,x2,u1,u2)
	2*x1*(1+x2)*sigmaF(u1)+(1+x2^2)*sigmaF(u2);
end proc:

Now I need to find a minimum of this function so I use the following code 

GlobalOptimization:-GlobalSolve(Fun,x1,x2,u1,u2);

where 

x1:=-5..5;
x2:=-10..100;
u1:=-1..1;
u2:=-1..1;

And I have the problem with plot function Fun. How to plot function Fun???

Best

 

Hello,

Would you please help me with this integral : 


 

restart

int(exp(i*x*t)/((x-a)*(x+a)), x = -infinity .. infinity)

piecewise(Im(a) = 0, undefined, int(exp(i*x*t)/((x-a)*(x+a)), x = -infinity .. infinity, method = _UNEVAL))

(1)

``


 

Download Integrale.mw

MAPLE CODE [below link]:


Dispersion.mw

range of "kx" variable [0 to 8x106] and range of "f" variable  [80x1012 to 220x1012]

Why different between calculate two form? I use maple 2017

evalf(sech(20)^2); evalf(sech(-20)^2);
                                     
                       1.699341702 *10^ -17  
                                     
                       1.699341702 *10^ -17  
evalf(1-tanh(20)^2); evalf(1-tanh(-20)^2);
                               0.
                               0.

 

i want to calculate the eigenvalues and eigenvectors of two matrices ,i get these results, can anyone explain to me the meaning ?

A:=linalg[matrix](3,3,[-1,2,0,4,-2,3,0,1,-3]);
> B:=linalg[matrix](3,3,[2,0,1,4,-1,1,2,0,-5]);

> eigenvalues(A);

                  8                                    4
1/2 %2 + -------------------- - 2, - 1/4 %2 - --------------------
                      1/2 1/3                              1/2 1/3
         (20 + 4 I 231   )                    (20 + 4 I 231   )

                  1/2 /                  8          \
     - 2 + 1/2 I 3    |1/2 %2 - --------------------|, - 1/4 %2
                      |                      1/2 1/3|
                      \         (20 + 4 I 231   )   /

                4
     - -------------------- - 2
                    1/2 1/3
       (20 + 4 I 231   )

              1/2 /                  8          \
     - 1/2 I 3    |1/2 %2 - --------------------|
                  |                      1/2 1/3|
                  \         (20 + 4 I 231   )   /

               1
%1 := --------------------
                   1/2 1/3
      (20 + 4 I 231   )

                   1/2 1/3
%2 := (20 + 4 I 231   )

eigenvectors(B);
               1/2      [            1/2  65          1/2   ]
[- 3/2 + 1/2 57   , 1, {[7/4 + 1/4 57   , -- + 9/28 57   , 1]}],
                        [                 28                ]

                   1/2      [            1/2  65          1/2   ]
    [- 3/2 - 1/2 57   , 1, {[7/4 - 1/4 57   , -- - 9/28 57   , 1]}],
                            [                 28                ]

    [-1, 1, {[0, 1, 0]}]

such a list H:=
                     [0, 4, 8, 1, 2, 1, 4, 2, 8]

what is the diffrence between these 2 commands ? has(H,integer), type(H,integer);

First 832 833 834 835 836 837 838 Last Page 834 of 2428