Items tagged with function


is it possible to generalize a function to a combinatorial level for approximate axioms

for example, first 100 or 1000 data points satisfy axioms

or 100% satisfy a axioms which means satisfy to infinity

because i find data always not exactly satisfy the axioms,
i guess it only satisfy to some limit, this may explain why data has decimal number

or conversely is it possible to generalize some axioms which approximate the original exact axioms
then data can exactly satisfy the approximate axioms

can generalize a nested forloop to achieve this goal?

how can it be done in algebra point of view?


For example:

x*y = for loop -> for loop -> i*j

it can change for loop expression into algebra

for i from 1 to 10 do
for j from 1 to 10 do
print i*j

I am having issues when defining functions in a loop. First, I define the first two functions as follows (here, r(x) is a function already assigned).


f_0 := x -> r(x):

f_1 := x -> r(x)*f_0(r(x)):


Then, I define successive functions in a for loop as follows.


for i from 2 to 10 do

   f_i := x -> r(x)*f_[i - 1](r(x));

end do


The loop defines the function f_2 but compiles erroneously for f_3 which, and I do admit, relies on f_2. Does someone have an idea of how to fix this issue? Any help will be greatly appreciated. Thanks.

Hi all!

I have this function:


Problem is it doesn`t have any output, really anoying! Could you please help. Thanks guys!

I need to find only the x for which a^x = b mod p is a solution of.

f := x^2+y-z=0

f2:= y^2 +z-x = 0

after shift , solution shift too, can it be said it is invariant in parameter shift?

if not, any example to show a function which is invariant in parameter shift?

> solve(f);
/ 2 \
{ x = x, y = -x + z, z = z }
\ /
> f2 := y^2+z-x;
y + z - x
> solve(f2);
/ 2 \
{ x = y + z, y = y, z = z }
\ /
> f;
x + y - z = 0

Hi all,

I am trying to solve the following differential equation numerically using dsolve,


y * abs (y''') = -1

y(0) =1, y'(0) = 0, y''(0)=0


it works fine when tthe absolute function is not there, i.e. yy''' = -1. 

Do you have any suggestion?

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?

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?




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:


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?

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