Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

I have a worksheet. I edit some variables' value. I then execute the whole worksheet to see how the graphs change. But the graphs generated by display command do not appear. All other calculations update fine. 

To overcome this. I save worksheet with my new variable values. Close the worksheet. Reopen it. Execute it. And now the graphs appear fine.

 

 I have a complex set of mechanical linkages and components, and I am trying to create a feedback control system for trajectory-tracking with the end-effector. They system is driven by a set of prismatic joints (representing ideal series-elastic actuators). At this stage I am simply trying to establish the control parameters and the required forces to achieve desired positions/velocities in the workspace, and have not yet inserted any realistic actuator characteristics.

An open-loop solution can be found using translational position control on the prismatic joints, this is no problem. However to close the loop properly, I need to convert the system to use a differential input, such as a velocity driver. At this point everything becomes very finicky and highly dependent on initial conditions. Generally Maplesim gives up, claiming that no solution can be found. Due to the complexity of the system, there is no way for me to guess a priori the appropriate initial conditions of all the joints and linkages. I was wondering if anybody had any tips for either pre-determining the initial parameters, or alternatively for relaxing the solver in some way to allow for a wider exploration of possible solutions. Or any other ideas!

So far: I have tried setting up an open loop position-driven system with the same trajectories and using Maple to read all the initial conditions, then transferring them as guesses to my closed-loop system. But this has not worked. As a temporary workaround I am using position drivers on the SEAs, which are in turn driven by a velocity controller (with an integrator term). However this is suboptimal. Any help would be much appreciated!

I  often find mself in the following quandry: I am investigating a problem, I do a few examples, run a do loop for j from1 to 5 to see if that works and then enter

for j from 1 to 200 do  a[j]:=blah, blah,...  end do:

and 15 minutes later nothing has happened. Is the loop finishing up with j = 198 or so or is it stuck at j = 23 and it will take forever to finish? Or perhaps there is an error that turns up for j > 23?

When I think about it I can insert a print(j) command to keep track of this but there are other situations where that doesn't work. For example,

Order := 35; mtaylor(....

When nothing happens is that because the calculation is almost done? or stuck? etc.

Is it possible to take a quick peek at the state of Maple and the decide whtether to continue the computation or abort? If the calculation of mtaylor(... is particularly long I might settle for the 15 coeficients computed so far rather than abort. Can I get at those?

Any advice?

 

 

Using the Fourier convolution theorem to solve f(t) =sin (t)

f(t)=R dJ(t)/dt+J(t)/C

Hi,

When I run two times my code, the results change.

Have you any idea, why???

 

 

Hi! 

When trying to find the fundamental solution of the Heat equation using Maple (software), I get the following Error message which seems to have no documentation available (?) :

Using :

          PDE := -(diff(f(x, t), t))+(diff(f(x, t), x, x))*Di = 0

assume(epsilon > 0);

pdsys := [PDE, f(x, 0) = Dirac(x-epsilon)];

pdsolve(pdsys, build)

"Error, (in casesplit/K) this version of casesplit is not yet handling the function: Dirac"

Anybody has an idea what that is? (Using Maple 17) . How can I solve this problem ? 

 

http://en.wikipedia.org/wiki/Heat_equation

 

Thanking you on Advance, 

Erez . 

Hi,

Please I need help in this subject. I would like to compare the numerical solution obtained by finite difference and pdsolve/numeric.

The equation considred is  diffusion Equation using Forward-time centered-space (FTCS) stencil
The code work well with Dirichlet boundary condition, but I want to let  x=-1  Dirichlet boundary condition but on x=1, we put a Neumann condition likeeval( diff(u(t,x),x),x=1)=1. Thank you very much to put the necessary in the attached code the changment.      
Many thinks.

Change_boundary_condition_in_procedure.mw    

assume f and g are unknown

and assume solve(f, x) = solve(g, x)

f -> a

g -> a

b -> f

b ->g

if assume f = (x+1)*(x+2), g = (x+2)*(x+3)

and a = (x+1)*(x+2)*(x+3)

would like to find map from (x+1)*(x+2) to (x+1)*(x+2)*(x+3)

 

is it the solution subs(x=(x+1)*(x+2),(x+1)*(x+2)*(x+3)) by composition?

 

subs(x=(x+1)*(x+2),(x+1)*(x+2)*(x+3))


subs(x=1, (x+1)*(x+2));
subs(x=2, (x+1)*(x+2));
subs(x=1, (x+1)*(x+2)*(x+3));
subs(x=2, (x+1)*(x+2)*(x+3));


6 -> 24
12 -> 60

subs(x=1, ((x+1)*(x+2)+1)*((x+1)*(x+2)+2)*((x+1)*(x+2)+3)); # not 24
subs(x=2, ((x+1)*(x+2)+1)*((x+1)*(x+2)+2)*((x+1)*(x+2)+3)); # not 60

it seems composition is wrong

more difficult and general case should be

f(x,t)  -> a(x,t)

g(x,t)  -> a(x,t)

b(x,t) -> f(x,t)

b(x,t) -> g(x,t)

 

solve(f(x,t), x) = solve(g(x,t), x) = in terms of t

 

 

Hi:

What methods to solve system nonlinear ordinary differential equations in maple?I follow a method to solve system nonlinear ode second order that very fast answer me?

Hi,

Please I need you to add in the output of my code the order of error defined in the procedure.

Thanks for helping me.

Here, the code.

QuestionNumber2.mw

Hi, I would like to solve this nonlinear problem :

 

with :

I use the NLPSolve command and i get this error : Error, (in Optimization:-NLPSolve) integer variables are not accepted.

Can you help me ?

 

 

 

 

Hi,

I solve laplace equation in a square. All the lines of my code is okay.

Please just look to the last part of my code titled procedure:

When I run my code without (last funciton f #f := (x,y) -> 0;) see last lines to find "f". It's runing, there is no problem. But when I put add f, there is an error. Many think  for any help.

Procedure
Using the previous suty in section stencil we can write the procedure to solve the Laplace equation in [0,1]*[0,1] with the boundary condition Neumann conditions on the vertical boundary and Dirichlet boundary condition on the horizontal baoundary. In our study we will use the same stepsize h in x and y direction.

PoissonSolve:=proc(N,_f)
local Z,i,h,y,x,sys,w,f,sol,j,u,Data;
# define basic grid parameters
Z := i -> (1/(N+1))*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);
 h := evalf(Z(1)-Z(0));
# Fix the boundary data and the source matrix
for i from 0 to N+1 do:
    # Neumann boundary condition
     u[N+1,i] :=  u[N,i] ;    
     u[0,i] := u[1,i];
     # Dirichlet boundary condition
     u[i,0] := 0;
     u[i,N+1] := 0;
   od:
   f := Array(0..N+1,0..N+1,[seq([seq(evalf(_f(Z(i),Z(j))),i=0..N+1)],j=0..N+1)],datatype=float);
# Write down the system of equations to solve and solve them
     sys := [seq(seq(Stencil(h,i,j,u,f),i=1..N),j=1..N)];
  w := [seq(seq(u[i,j],i=1..N),j=1..N)];
  sol := LinearSolve(GenerateMatrix(sys,w));
   # parse the solution vector sol back into "matrix" form
   for i from 1 to N do:
     for j from 1 to N do:
        u[i,j] := sol[(j-1)*N+i]:
     od:
   od:
# generate a 3D plot of the solution using the surfdata command
   Data := [seq([seq([Z(i),Z(j),u[i,j]],i=0..N+1)],j=0..N+1)]:
surfdata(Data,axes=boxed,labels=[`x`,`y`,`u(x,y)`],shading=zhue,style=patchcontour);
end proc:



Here is an example of the output when the source function is set to zero
                                 f(x, y) = 0
; i.e., when  reduces down to Laplace's equation:
#f := (x,y) -> 0;
#PoissonSolve(10,f);

 

 

Question8.mw

Hi

I need you to help me in writting procedure with input "r" ( order of derivative) and some coefficients seq(alpha[i],i=1..N).  My code work very well, need only put all the element in procedure with output The Taylor series obtained in last line of my code and the order of error.  I want the procedure return the coefficients beta used in the series and the order of Error  and the coefficients beta[i]

May thinks.

Second_Question.mw

 

I will not modify my previous question: only I add this remark. I tried to write these lines of procedure.
Add_display.mw

I need only to add( if the procedure is true) these lines in my procedure.  These lines gives the degree of error computed in the code, but when I put these lines in the codes, there is an error. Thanks for your help.

Degree := degree(Error,stepsize);
    if (showorder) then:
       print(cat(`This stencil is of order `,Degree));
    fi:
    if (showerror) then:
       print(cat(`This leading order term in the error is `,Error));
    fi:
    convert(D[r$n](f)(vars) = stencil,diff);

 

 

 

Dear all,

Please, I need help to remplace in the code attached,  addadd(beta[i]*u(x+[i]*h),i=0..N)+Error; 
by add(beta[i]*u(x+alpha[i]*h),i=0..N)+Error;  I see, that we must add a function, alpha, but how.

I think I must modify this rows: but how:

stencil := add(a[ii[i]]*subsop(r=op(r,phi)+ii[i]*stepsize,phi),i=1..N);

Question2.mw

 

Many thinks

R dJ(t)/dt+J(t)/C=f(t)

where f(t) is a driving electromotive force. Use the fourier transform to analyze this equation as follows.

 

 

Find the transfer function G(alpha)  then find g(t) .

 Thanks ....

First 262 263 264 265 266 267 268 Last Page 264 of 361