Items tagged with function

When you label a function of curve, this label is put just next to it. Is there a way to move this label to another position of the same curve?

Dear people in mapleprimes,


>define(INT, linear, conditional(INT(a::algebraic, X::name) = a*X, _type(a, freeof(X))), INT(X::name, X::name) = (1/2)*X^2);

>INT(2*x+4, x);

x^2 + 4*x

>INT(z+x, z);

(1/2)* z ^2+ x*z

is written in the help page of maple.

This code is to make a function INT.

What it means is that if INT(a::algebraic, x::name) then this is transformed into a*X, where a is independent from x.

And, INT(X::name,X::name) is transformed into (1/2)*X^2.


The first of what I want to ask you is the way of use of "_type", which is not in the help page, and as for names with "_" ahead, 

it is written that "_" means internal command for Maple, so not to use it. Is it right to use a name with "_" ahead of it here?

The second of what I want to know is the way to use "conditional."

Please teach me the meaning of this.

Thanks in advance.


I hope you will teach me the above questions.


Best wishes.





I have been having problems with using the BodePlot function with units:


R1 := 18.2*10^3*Unit('Omega');

R2 := 10^3*Unit('Omega');

C1 := 470*10^(-12)*Unit('F');

C2 := 4.7*10^(-9)*Unit('F');

# wo is in hertz

wo := 1/sqrt(R1*R2*C1*C2);

# Q is unitless

Q := wo*R1*R2*C2/(R1+R2)



sys := TransferFunction(wo^2/(s^2+wo*s/Q+wo^2));


This is the error message I got:

Error, (in Units:-Standard:-+) the units `1` and `Hz` have incompatible dimensions


I think the problem is that the BodePlot function doesn't expect 'wo' to have units.  

So I tried to work around the issue by using the loglogplot but it doesn't seem to like 

complex function even when I used abs to find the magnitude (with or without units).


 Any workaround is appreciated.


Maple 15 allows the following syntax

omega := sqrt(w0^2*(1+((z-zf)/z0)^2))

But it does not allow this one 

omega^2 := sqrt(w0^2*(1+((z-zf)/z0)^2))

Why is this so for functions and variables? Is there any way around this, I am really bugged by this issue. The Maple Math told me that the syntax was invalid so I had type the commands directly.



I'm trying make Maple write the actual result, when i differenting an expression: x[s] := x(t)+sin(theta(t))*a.
when i differentiate with respect to t, i get:

> diff(x[s], t);
print(`output redirected...`); # input placeholder
/ d \ / d \
|--- ()(t)| + cos(theta(t)) |--- theta(t)| a
\ dt / \ dt /

Maple, writes the expression as a table, but i need to see the normal function? Why does it do that? And how can i make it show the expression as a normal function?

When i derive the two parts serperately i get the normal result, but as soon as i add them together, i get the table rasult again?

Is there an easy trick for this one?




Consider the function



The above definition may result in four cases depening on r and x.

Can Maple calculate automatically all possible cases and the corresponding Maxima, Minima and Values at intervals limits?


Hi all

Assume that we have a function, say f(t) and we want to substitute t in it where t is:


by subs or other better command, how can we do it?

best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department







Why are the results of the two orders above so different???

A bug in the function of inequal???

Maple does not cancel out a variable.

Why is that?

Is there a way to solve this? 

(I pasted my code on the bottom of this message)


Thanks for your help/advice,


# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:



I need to build a multibody model in MapleSim 6.4 in which with few global parameters I can describe all the other parameters. In other words the final user will enter this few parameters, that are coordinates of specific points, and then the model will calculate all the relative distances on the base of those coordinates.

The problem is that if I apply trigonometric function and square root (like in the screenshot) the model is not calculating any value. Is it possible to make those calculculations?


this is the model (don't worry about the nonsense plots, it's because it's not ultimated):






Hi there,

I was trying to simulate the behaviour of a one-variable, discrete-time function having three parameters.

The function reads


defined for b, theta, m > 0

Say I want to simulate the function for the following values

b := [seq(1 .. 10, 1)];
theta := [seq(1 .. 5, 1)];
m := [seq(1 .. 2, 1)];

for n from 1 to 10.


I guess I need to build a 4-dimension array. But I was not able to find the right way to do this: should I use the Array strucutre? and if yes, how would I do it? As far as I've read, indexing would be an issue: should I create special indexing functions?

If I'm not wrong Maple matrices (Matrix) are just 2D.


Once the values of M computed, I would like to generate the corresponding plots, varying one parameter while the other two are fixed, and drawing the different M's in the same plot.

How can I achieve this?

Furthermore, if I would like to generate all possible combinations, I guess I would need to insert the solution given to the above question within a for loop. Will Maple display all plots or will it overlap/overwrite the preceding plot if used within a loop?




In Maple, I want to define a set of functions by means of two for loops:


    # Node coordinates.

    # Partition of unity.
    for j from 2 by 1 to N_x-1 do
        for k from 2 by 1 to N_y-1 do

However, this gives output in which the `[j,k]` vary but the `x_n[j-1]`, `x_n[j+1]`, `y_n[j-1]` and `y_n[j+1]` are not evaluated. But if I for instance input `x_n[3]` I correctly get 1/2 as answer.

How do I solve this?


How can I substitute a function in a matrix? This is what I tried but it's not working at all:

T := GenerateMatrix([lign1, lign2, lign3, lign4],[x, y, z], augmented);

Then I'd like to substitute another function with lign1:

T2:=subs(lign1=lign5, T);

But T2 = T and that wasn't really the point.


Sorry if the answer is obvious no amount of searching has helped me so far. I hope this question isn't too ridiculous.




I have a function, lets say g(x,y,...), that depends on many other functions. But I don´t want the results that are inside certain intervals, and I need to receive the results of those functions as something like NULL when asking for a result that is inside any of those intervals. That way, g(x,y,...) would also have to result in something like NULL if any of the lesser functions are NULL fora any given values.


I tryied using the piecewise command, and for the intervals that I wanted, it worked, but for those I wanted to be NULL, they were understood as 0, and so G(x,y,..) continued to exist but with a very different value.


To clarify what I need, I will try an exemple:


Imagine I have the function f(x)=x


I want to disconsider the results for x<2 and x>6, in a way that if I try the command 'f(1)', I will receive something like NULL and know that it is outside the range.


In the same way, I need the plot of this function f(X) to show the function only from 2 to 6, but not existing for the delimited intervals.


Ad if I continue and make g(x)=f(x)+10 , I don´t want g(x) to exist if f(x) doesn´t exist, and same for the g(x) plot, which shouldn´t be shown in the intervals where f(x) don´t exist.



Thank you very much for your atention!



4 5 6 7 8 9 10 Last Page 6 of 27