MaplePrimes Questions

is there a built in command to get rid of terms of some order or greater in a given variable?

say i have:

myeq:=diff(mu[m](t), t, t) = (-2*d^2*phi[0]^2-2*phi[0]^2)*mu[m](t)/(2*C_J*phi[0]^2*L)+(J*L*sin(mu[m](t)/phi[0])*d^2+J*sin(mu[m](t)/phi[0])*L)*mu[p](t)^2/(2*C_J*phi[0]^2*L)+J*cos(mu[m](t)/phi[0])*d^3*mu[p](t)/(phi[0]*C_J)+(I_b*L*d*phi[0]^2-2*J*L*sin(mu[m](t)/phi[0])*phi[0]^2-d^2*Phi[xx]*phi[0]^2-phi[0]^2*Phi[xx])/(2*C_J*phi[0]^2*L);

and i want to get rid of all terms of O(d^2).

i know i can do this

lhs(myeq)=algsubs(d^2=0, rhs(myeq));

or

lhs(myeq)=convert(series(rhs(myeq), d=0, 2), polynom);

but I wonder if there is a built-in command. 

thanks

Sometimes Maple can be endlessly frustrating!!

A recent question of mine on how to distribute integrals into a sum was answered:

http://www.mapleprimes.com/questions/201500-Integral-Of-A-Sum--Sum-Of-Integrals-In-Maple

Now I need the same thing, except (as part of a solution) Maple chose to use Intat rather than Int.

So I modify the rule I have to look like this:

ToSumInt:=Intat(A::algebraic*Sum(v::algebraic,r::{name,equation})*B::algebraic,u::{name,equation})=Sum(Intat(A*v*B,u),r);

.. and for the heck of it I cannot get Maple to accept this, no matter what type I make u to be. The error message always looks the same:

Error, invalid input: Intat expects its 2nd argument, dx_at_t, to be of type symbol = algebraic, but received u::{name, equation}

and you may replace the u::{name,equation} with any other u::type you care to think of.

Any help would be appreciated.

M.D.

Edit: Also, useInt will not replace the Intat (in the expression I want to apply the rule to) with Int.

Sorry if this has been already posted.

 

When print() is invoked from a proc into a module, non-English characters are not properly displayed with Maple 18.

It works ok if it is invoked from within the workbook.

 

Example:
print("Están en perspectiva")

Put this sentence in a proc into a module and the character "á" wont be displayed

Output: "Est�n en perspectiva"

Any hint about how to treat this issue?

Thank you very much.

César Lozada 

 

 

To those who read this post.

 

I have a question about the property of local variables in a procedure.

Are names at the local variables in procedures, strings not names? 

If so, why can strings be evalated to have Integer, which is numbers for counting for continuing repetition? 

This is the code which searches for the maximum value. 

**************************************************

Max2 := proc()

local i, m :: string;
if nargs = 0 then
return -infinity
end if;
m:= args[1];
for i from 2 to nargs do
if args[i] > m then
m := args[i]
end if;
end do;
m;
end proc:
Max2(1,7,5,4,6,10,35,63.5,-10,5);

 ************************************************

type(a,name);

              this answer was true.

type(1, string)

              this answer was false, of course.

 

I limited the values of local variables to be string.

But, to the sequence 1,7,5,4,6,10,35,63.5,-10,5, any error messages wouldn't appear.

I hope any of you will give me an answer.

Thank you in advance.

 

taro yamada

 

 

 

 

 

So im trying to write a maple script that computes the Jordan form of a given (3x3)- matrix
A. If {a,b,c} is a basis with respect to which A is in Jordan form, then I'm trying to make it
plot the three lines spanned by a, b and c, in the standard coordinate system. I was hinted to use plot3d here.

sidenote: I know how to compute the jordan matrix of A, such by find the eigen vectors and generalised eigen vectors and putting them in as columns in a 3x3 matrix say S,   where S is invertible    then  (S^-1)*(A)*(S) = (J).

Thanks in advance. <3

Hi:

i follow the code newton raphson for solve system nonlinear ODE in maple,every body have code for it?

How would you do a quick sort or bubble sort?

When creating questions with Question Designer, how can I include notes that are visible to instructors only? I don't want students to see certain info. Is it in the "information fields"?   

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.

 

Book1.xlsHelow ,

 I want to plot a gaph the data is store in excel sheet. thanks in advance

 

 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!

int((1-r^3+3*r^2-3*r)(r^3-3*r^2+3*r), r = 0 .. 1);
print(`output redirected...`); # input placeholder
/ 3 2
| / 3 2 \ / 3 2 \
int\-r\r - 3 r + 3 r/ + 3 r\r - 3 r + 3 r/

\
/ 3 2 \ |
- 3 r\r - 3 r + 3 r/ + 1, r = 0 .. 1/

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?

 

 

¿How can I substitute multiple variables with the alsub command at the same time?

For example, if I want to substitute  x=x1, y=x2, .... into the expression f=x*y+x^2+.... using just one command

Hi everyone,

Command "discont" can return the discontinuous point of the function. 

In Maple Help, it says that multiple discontinuities may be expressed with _Zn, _NNn and _Bn but just show the _Zn case and the _NNn case.

 

Can anyone offer the _Bn case?

Thanks!

First 1427 1428 1429 1430 1431 1432 1433 Last Page 1429 of 2427