MaplePrimes Questions

I want to write a procedure ThirdDer := proc(f,x0,h) which, given the funcion f, the point x0 and the step size h returns the value of f'''(x0). where f'''(x0) = (f(x0 +2h)−2f(x0 +h)+2f(x0 −h)−f(x0 −2h))/2h^3 

help

I tried splitting f''' up and assigning the 4 different parts as a letter then putting it all together but that didnt work..

Morning all,

I repeatedly solve (command solve) a collection of systems of inequalies. Some of them can have no solution, but I am able to check if a solution has been found or not, and then take some decision about the system in question.

I have placed a few print commands at different critical locations within the loop where those systems are constructed and possibly solved.
Every time solve fails finding a solution it returns me a "no solution found" warning.
In order to keep my printings readable, could it be possible to avoid those warnings ?
Is there some "try & catch" like mechanism to manage warnings ?

Thank you all in advance

I can't understand how to install this package "SADE" in Maple 17. Secondly, I am new to Maple. So Please guide me the process to install this package and how to use it. Thanks!

I'm trying plot  with implicitplot a expresion which involve Lambert W, but the result is very confuse, is it normal? Could i improve the result?, how?. Thank!

 

I've encountered a very strange issue with Maple.

The result returns differently with solve and fsolve after/before a variable is given a certain value. See attachment.

The result comes from solve (with variable epsilon) returns value of the same variable with imaginary part while the fsolve returns the correct answer.

Now how can I achieve the same result as fsolve via solve?

Thanks!

Maple_Question_Solve_Fsolve.mw

Maple_Question_Solve_Fsolve.pdf  (exported PDF from Maple)

Hi everyone,

 

I'm to simplify the expression cos(x)/sin(x) to cot(x). None of the "simplify" commands seem to work, I've tried assigning the expression to a name "a", then using the "simplify(a,trig)" command and it doesn't work either.

Anyone have any ideas on how I can tell maple to simplify this?

I've got some points:

I have to find the (equation of) line which has minimum distance from these points but the distance formula that I have to use is:
 (-m*x[i]-q+y[i])^2

I think we should settle with a for loop.

Thanks in advance

 

 

Hey guyz, I am in trouble with calculation attached integral. it is a simple function but a bit long. I can't solve it with maple, Do U have any idea?

 

 

intg.mw

 

 

hello, i just try to plot the relation between my outputs (u, and phat) with i from 0 to 10 , but i have aproblem any suggestions? 
 

M := .4556;

.4556

(1)

K := 18;

18

(2)

c := .2865;

.2865

(3)

Nabla(t) := .1NULL

.1

(4)

Khat := 206.1055;

206.1055

(5)

NULL

N := 10NULL

10

(6)

``

NULL

NULL

a__1 := 4/.1^2*.4556+2/(.1)*.2865NULL

187.9700000

(7)

``

NULL

NULL

a__2 := 4/(.1)*.4556+.2865NULL

18.51050000

(8)

``

NULL

NULL

a__3 := .4556NULL

.4556

(9)

NULL

NULLNULL

fu := Array(0 .. 10):

p:=Array(0..10):
  p[0]:=0:
  for i from 0 to 4 do
      p[i+1]:=50*sin(3.14*(i+1)*(4)/0.6):
      phat[i+1]:= p[i+1]+((7)*u[i])+((8)*u__dot[i])+((9)*u__doubledot[i]):
      u[i+1]:= phat[i+1]/(5):
      u__dot[i+1]:=(20*(u[i+1]-u[i]))-u__dot[i]:
      u__doubledot[i+1]:= ((400*(u[i+1]-u[i]))-(40*u__dot[i])-(u__doubledot[i])):
end do;
for i from 5 to 9 do
      p[i+1]:=0.0:
      phat[i+1]:= p[i+1]+((7)*u[i])+((8)*u__dot[i])+((9)*u__doubledot[i]):
      u[i+1]:= phat[i+1]/(5):
      u__dot[i+1]:=(20*(u[i+1]-u[i]))-u__dot[i]:
      u__doubledot[i+1]:= ((400*(u[i+1]-u[i]))-(40*u__dot[i])-(u__doubledot[i])):
  end do;

 

 

24.98850513

 

24.98850513

 

.1212413309

 

2.424826618

 

48.49653236

 

43.28799198

 

133.0574982

 

.6455795610

 

8.061937982

 

64.24569494

 

49.99998414

 

349.8504158

 

1.697433673

 

12.97514426

 

34.01843056

 

43.32779001

 

618.0696023

 

2.998802081

 

13.05222390

 

-32.47683816

 

25.05744793

 

815.5490181

 

3.956949320

 

6.11072088

 

-106.3532218

 

0.

 

808.4457346

 

3.922485012

 

-6.80000704

 

-151.8613364

 

0.

 

542.2499525

 

2.630933927

 

-19.03101466

 

-92.7588160

 

0.

 

100.0021368

 

.4851987783

 

-23.88368831

 

-4.2946573

 

0.

 

-352.8528440

 

-1.712001106

 

-20.06030938

 

80.7622360

 

0.

 

-656.3359300

 

-3.184465868

 

-9.38898586

 

132.6642346

(10)

 

``

fd_table:=eval(seq[u(i),phat(i)],i=0..N);

seq[(table( [( 0 ) = 0, ( 1 ) = .1212413309, ( 2 ) = .6455795610, ( 3 ) = 1.697433673, ( 4 ) = 2.998802081, ( 5 ) = 3.956949320, ( 6 ) = 3.922485012, ( 7 ) = 2.630933927, ( 9 ) = -1.712001106, ( 8 ) = .4851987783, ( 10 ) = -3.184465868 ] ))('i'), (table( [( 1 ) = 24.98850513, ( 2 ) = 133.0574982, ( 3 ) = 349.8504158, ( 4 ) = 618.0696023, ( 5 ) = 815.5490181, ( 6 ) = 808.4457346, ( 7 ) = 542.2499525, ( 9 ) = -352.8528440, ( 8 ) = 100.0021368, ( 10 ) = -656.3359300 ] ))('i')]

(11)

``

plot([u(i+1), p(i+1)])

Error, (in plot) invalid input: assigned expects its 1st argument, n, to be of type assignable, but received table( [( 0 ) = 0, ( 1 ) = .1212413309, ( 2 ) = .6455795610, ( 3 ) = 1.697433673, ( 4 ) = 2.998802081, ( 5 ) = 3.956949320, ( 6 ) = 3.922485012, ( 7 ) = 2.630933927, ( 9 ) = -1.712001106, ( 8 ) = .4851987783, ( 10 ) = -3.184465868 ] )

 

``

``


 

Download hw_4_structural.mw

Hello everyone,

 

     I am having trouble trying to solve a system of differential equations. The modeling was made from the equilibrium equations of a pressure vessel. The set of equations is shown below:

     As you see it is a set of two second-order partial differential equations. So, we need four boundary conditions. This one is the first. It means that the left end of the pressure vessel is fixed.

This one is the second boundary condition. It means that the right end of the pressure vessel is free.

This one is the third boundary condition. It means that the inner surface of the pressure vessel is subject to an external load:

At last, we have the fourth boundary condition. It means that the outer surface of the pressure vessel is free.

     The first test I have been trying to do is the static case. In this case, the time terms (the right side of the two equations shown) is zero.

    The maple commands that I am using are the following:

 

restart; E := 200*10^9; nu := .33; G := E/(2*(1+nu)); RI := 0.254e-1; RO := 2*RI; p := proc (x) options operator, arrow; 50000000 end proc; sys := [E*(nu*(diff(v(x, r), x))/r+nu*(diff(diff(v(x, r), x), r))+(1-nu)*(diff(diff(u(x, r), x), x)))/(-2*nu^2-nu+1)+G*(diff(diff(u(x, r), r), r)+diff(diff(v(x, r), x), r)+(diff(u(x, r), r))/r+(diff(v(x, r), x))/r) = 0, E*((1-nu)*(diff(diff(v(x, r), r), r))+nu*(diff(diff(u(x, r), x), r))+(1-nu)*(diff(v(x, r), r))/r-(1-nu)*v(x, r)/r^2)/(-2*nu^2-nu+1)+G*(diff(diff(u(x, r), r), x)+diff(diff(v(x, r), x), x)) = 0]; BCs := {E*(nu*v(L, r)/r+nu*(D[2](v))(L, r)+(1-nu)*(D[1](u))(L, r))/(-2*nu^2-nu+1) = 0, E*(nu*v(x, RI)/RI+(1-nu)*(D[2](v))(x, RI)+nu*(D[1](u))(x, RI))/(-2*nu^2-nu+1) = -p(x), E*(nu*v(x, RO)/RO+(1-nu)*(D[2](v))(x, RO)+nu*(D[1](u))(x, RO))/(-2*nu^2-nu+1) = 0, u(0, r) = 0}

sol := pdsolve(sys, BCs, numeric)

 

I am getting the following error:

 

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions must depend upon exactly one of the independent variables: 0.1459531181e12*v(L, r)/r+0.1459531181e12*(D[2](v))(L, r)+0.2963290579e12*(D[1](u))(L, r) = 0

In this case, my boundary conditions do depend on more than one independent variable. How do I proceed?

 

Thank you in advance,

Pedro Guaraldi

 

 

Is there anyone who has seen maple 2017 provide some details about what new features are being introduced. Is there a platform where we can suggest what features we would like to be added or enhanced?

I'm trying to define some multilinear forms to study differential geometry. What I need is only symbolic. My intention is symplify computations involving multilinear forms.

For example, to create an symbolic inner product "g" I used the command "define" like in this post:

http://www.mapleprimes.com/questions/203480-Define-And-Use-Abstract-Linear-Operator

 

So I tipped:

define(g, orderless, multilinear);

 

My doubt is: how can I declare that g(x,y) is always scalar?

With it I would simplify things like g(g(z,w)*x,y) = g(z,w)*g(x,y)

 

In my case, specifically, I type:

v:=(X,Y,Z)->g(Y,Z)*X-g(X,Z)*Y;

r:=(X,Y,Z,W)->g(v(X,Y,Z),W)-g(Y,T)*g(v(X,T,Z),W)+g(X,T)*g(v(Y,T,Z),W);

expand(r(X,Y,Z,W));

and the result is:

g(W,g(Y,Z)*X)-g(W,g(X,Z)*Y)-g(T,Y)*g(W,g(T,Z)*X)+g(T,Y)*g(W,g(X,Z)*T)+g(T,X)*g(W,g(T,Z)*Y)-g(T,X)*g(W,g(Y,Z)*T)

But I would enjoy that it were:

g(Y,Z)*g(W,X)-g(X,Z)*g(W,Y)-g(T,Z)*g(T,Y)*g(W,X)+g(X,Z)*g(T,Y)*g(W,T)+g(T,Z)*g(T,X)*g(W,Y)-g(Y,Z)*g(T,X)*g(W,T)

 

Is there a way to declare that g(x,y) is always scalar?

Thanks.

 

 

I have a problem using dchange when my variable depend on two (or more variables) and I would like to apply the chain rule.

For example, when I use the command

I would expect something like 

But I get an error saying that the number of new variables and transformation equations must be the same.

Any idea how I could solve it? 

Thanls a lot for your help.

 

Hi I have this code

 psi:=proc(n,x);
 (1/sqrt(sqrt(pi)*2^n*factorial(n))*exp(-x^2/2)*HermiteH(n,x))
 end proc;
 psi := proc(n, x) exp(-1/2*x^2)*HermiteH(n, x)/sqrt(sqrt(pi)*2^n*n!) end proc

 psi2=proc(a,x);
 psi(a,x):=(1/sqrt(sqrt(pi)*2^a*factorial(a))*exp(-x^2/2)*HermiteH(a,x))
 end proc;
psi2 = (proc(a, x)
    psi(a, x) := exp(-1/2*x^2)*HermiteH(a, x)/sqrt(sqrt(pi)*2^a*a!)

end proc)
 for n from 0 to 2 do;
 for a from 0 to 2 do;
 result=proc(n,a);
 result(n,a)=psi*psi2
 end proc;
print(evalf(int(result(n,a),x=0..infinity)));
od;
od;


it returns

 Float(infinity) signum(result(0, 0))

                     Float(infinity) signum(result(0, 1))

                     Float(infinity) signum(result(0, 2))

                     Float(infinity) signum(result(1, 0))

                     Float(infinity) signum(result(1, 1))

                     Float(infinity) signum(result(1, 2))

                     Float(infinity) signum(result(2, 0))

                     Float(infinity) signum(result(2, 1))

                     Float(infinity) signum(result(2, 2))

I know the results for (0,0), (1,1) and (2,2) should be 1 and the rest should be 0.

Can anybody help fix this please

First 999 1000 1001 1002 1003 1004 1005 Last Page 1001 of 2428