MaplePrimes Questions

 

Dear all

if I have a vector defined as u[1..11,1]:=

How can display the coeffients of  this vectors 
can I plot the vector 

Thanks for any help

I have a complex PDE as follows:

where u(x, t) is a complex function.

The following function u_11(x, t) is a solution for the PDE above. 

 

 

where

 

I want to check whether the u_11(x,t) is a solution for the PDE or NOT. 

 


 How to correctly define the complex PDE in MAPLE?
 

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(abs(u(x,t))^2)*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(abs(u(x,t))^2)*u(x,t) + gamma[3]*diff((abs(u(x,t))^2),x)*u(x,t) )=0;

or

PDE:=I*diff(u(x,t),t)+diff(u(x,t),x$2)+alpha*(evalc(abs(u(x,t))^2))*u(x,t)+ I*( gamma[1]*diff(u(x,t),x$3) + gamma[2]*(evalc(abs(u(x,t))^2))*u(x,t) + gamma[3]*diff((evalc(abs(u(x,t))^2)),x)*u(x,t) )=0;

Let's check the solution is right or not:

k:=(gamma[2]+2*gamma[3]-3*gamma[1]*alpha)/(6*gamma[1]*gamma[3]);
omega:=(((1-3*gamma[1]*k)*(2*k-c-3*gamma[1]*(k^2))  )/(gamma[1]))+(k^2)-gamma[1]*(k^3);

uu[11]:=1/(gamma[2]+2*gamma[3])^(1/2)*(-3*(3*k^2*gamma[1]+c-2*k))^(1/2 )*sin(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))/ cos(1/2/gamma[1]*2^(1/2)*(gamma[1]*(3*k^2*gamma[1]+c-2*k))^(1/2)*(-c*t+x))*exp( I*(k*x-omega*t));
pdetest(u(x,t)=uu[11],PDE);

 

 download-code.mw

 

Solve the following problems using computer. Use Algorithm from  Algorithm 4.4 in the textbook with 1) n = 4,m = 8, 2) n = 8,m = 4, and 3) n = m = 6 to approximate the following double integral and compare the results to the exact solution
∫∫cos ydydx (interior integral from 0 to x and exterior integral is from 0 to pi)

Hi

I have crreated a transfer function of a rather complex system using TransferFunction() and recived a transfercundtion of a rather high order (n=10). However due to the kinematics of the model I know that is is posible to expres as an second order transfer function.

So I have been locking around Maple for a function that can help me reduce or approwqimate the transfer function as a sencond order but I have not found anything.

Is there a way to reduce/approximate an n order transfer function to a second order transfer function?

Mvh

Eric Ragnarsson

 

dear all

I have a linear system AX=b , I would like to compute the solution using Gradient conjugate method 

CS.mw

I get the following error
Error, (in LinearAlgebra:-LinearSolve) method SparseIterative incompatible with data of type anything
 

Thank you for any help

Hi

It want to generate all the words from a NL-letter alphabet and whose lengths are at most LW.

I could not find any function in the combinat package do to that (at least without combining some of them, I'm using Maple 2015 right now); maybe the Iterator package has some features do to that?

For the moment I use this procedure (which generates a few words of length LW+1 I have to suppress)

restart:
G := proc(d)
 local n, wo:
  global W:
  while max(length~(W)) < d do
    wo := copy(W):
    for n from 1 to nops(L) do
      W := {W[], cat~(wo, L[n])[]};
    end do:
    thisproc(d)
  end do:
end proc:


# Words of length not larger than LW which are made of at most NL letters

NL := 3:
L  := StringTools:-Char~([$65..65+NL-1]);
W  := L:
LW := 3:

G(3):
w3 := W;
                        ["A", "B", "C"]

{"A", "AA", "AAA", "AAB", "AAC", "AB", "ABA", "ABB", "ABC", "AC", 

  "ACA", "ACB", "ACC", "B", "BA", "BAA", "BAB", "BAC", "BB", 

  "BBA", "BBB", "BBC", "BC", "BCA", "BCB", "BCC", "C", "CA", 

  "CAA", "CAB", "CAC", "CB", "CBA", "CBB", "CBC", "CC", "CCA", 

  "CCB", "CCC"}


W  := L:
CodeTools:-Usage( G(12) ):
numelems(W);

memory used=0.62GiB, alloc change=422.58MiB, cpu time=13.70s, real time=8.37s, gc time=8.08s
                             797160

Words_Generator.mw

Do you have any idea to improve it from memory used and cpu time points of view)?

Thanks in advance

How should I find the roots for

5x^3-x^2+x-1=0

If I have a Polynomial of the form say 

c1x^{a1} y^{b1} +c2x^{a2} y^{b2} +... +cnx^{an} y^{bn}

Now I want to form a list say of the form

 

L=[[[a1, b1], c1], [[a2, b2], c2],.... [[an, bn], cn]] 

 

Kind help with a peice of code 

 

Hi,

Have the following integral to solve in Maple (2020):

Cap_Unit_Length := int((epsilon_0*epsilon_r*d*sqrt(1+(T*Pi*S)^2))/(epsilon_r*S*theta*tan(theta/2)+2*t),theta=0..Pi);

As Maple cannot find a closed expression, it returns the original input.  Is there any other approach in Maple I can use to attack this expression?  BTW, this is the expression for the distributed capacitance in a twisted wire pair.

Chris

Hello,

I would like to make a function of two variables. It seems that what I can find online on how onthers do it, does not work with my. Can someone help? Here is the document, but it is very simple. eq_of_two_var.mw

Dear all

I would like to plot two different functions

One constructed using piecewise and second function on the sme interval. 

The code run without error but I am not sure that its true, since we have two different function but in the graph we can not see the difference betweem them 

 

codexsqrr.mw

Thank you for your help

Dear all
I have a problem using unapply to construct all functions defined in each intervals.
If I use unapply to construct only two peicewises fuctions the code work well, but otherwise there is someting missing 
splineProb.mw

## using code like this, its run 
ff:=unapply
                  ( piecewise
                    ( x < eval( Xlist[2], NaturalCoeffs),
                      expand( eval( S[1], NaturalCoeffs) ),
                                           expand( eval( S[3], NaturalCoeffs) )
                    ),
                    x
                  );
 

but using code like 
 

unapply
                  ( piecewise
                    ( x < eval( Xlist[2], NaturalCoeffs),
                      expand( eval( S[1], NaturalCoeffs) ),
                     ( x < eval( Xlist[3], NaturalCoeffs),
                      expand( eval( S[2], NaturalCoeffs) ),

                      expand( eval( S[3], NaturalCoeffs) )
                    ),
                    x
                  );
does not run and return 
Error, `;` unexpected
 

Thank you for your help 

Hello, I was recently given a Calculus 3 assignment on Maple. Having no training or teaching, I watched videos and looked up possible routes to finding the solution. I have been working on this assignment the past couple days and could really use some help. The questions I am struggling with are posted below:

Equation given: r(t) = cos(t^3)i + sin(t^3)j + 2t^2 k

1. Use Maple to graph the tangent line at t = 0.8, and the path of the particle from t = 0 to t = pi/2 on the same graph. The line segment for the tangent line should be symmetric about the point of tangency.

2. Find the unit binormal vector when t = 0.8

3. Use Maple to find the normal vector when t = 0.8

4. Find the torsion when t = 0.8

5. Use Maple to graph the unit tangent vector at t = 0.8, the unit normal vector at t = 0.8, the binormal vector at t = 0.8, and the path of the particle from t = 0 to t = pi/2 on the same graph. All the vectors should have the particle's position at t = 0.8 for their initial point. (You are really graphin line segments of length 1.)

 

 

Let A a (linear) partial differential operator and f=f(x, y, t) a function of space (x, y) and time (t).
Let DXY=[a, b] x [c, d], DT=[0..e] and  dXY the boundary of DXY.
Is it possible, with Maple 2015, to solve numerically the pde Af=0 in the open domain  DXY * DT
with Dirichlet conditions on dXY and initial condition f(DXY, 0)?
It seems that the option 'numeric' of pdsolve doesn't work with more than 1 "non time" independent variable:
Error, (in pdsolve/numeric/process_PDEs) can only numerically solve PDE with two independent variables, got {t, x, y}

Nevertheles I seem to remember seeing this on Mapleprime (?)
If Maple 2015 can't do it, can Maple 2020?

Thanks in advance

  • Remark: Af=0 is the heat equation with rho=Cp=lambda=1.
    I guess I could code the alternate directions method to transform  Af=0 into a sequence Axf=0,  Ayf=0 Axf=0 ... of 1D diffusion equations but I'm a little bit lazzy and I'm waiting for your feedback before doing this.

 

dear all

I hope to write taylor expansion with remainder lagrange ..That is taylor lagrange expansion of a given function.

I tried 
series(cos(x),x=0,5) 

or taylor(cos(x),x=0,5) 
always the remainder written USING O(x^6)
I want the reminder depend on the derivative ..that is Lagrange Taylor expansion

Many thanks

First 433 434 435 436 437 438 439 Last Page 435 of 2427