## is it possible to generalize a function to a combi...

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
od:
od:

## Defining a function in a loop...

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.

## Problem with function...

Hi all!

I have this function:

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

## how to find a function example which is invariant ...

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;
2
y + z - x
> solve(f2);
/ 2 \
{ x = y + z, y = y, z = z }
\ /
> f;
2
x + y - z = 0

## abs function dsolve...

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?

## How to move curve labels?...

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?

## BodePlot function doesn't like inputs with units...

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)

with(DynamicSystems);

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.

## Why can I not define the square of a function/vari...

Greetings,

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.

## Differenting an expression with two time dependent...

Hi

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?

-Nicolai

## substitution a sequnce of numbers in a function...

Hi all

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

t=[0,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]

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

best wishes

Ph.D Candidate

Applied Mathematics Department

with(plots)

inequal((2*c-1)/(3*c-1),c=0..1.5,Alpha=0..1)

with(plots)

inequal((2*c-1)/(3*c-1),c=0..1,Alpha=0..1)

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

A bug in the function of inequal???

## piecewise function simplify / cancel out a variabl...

Hello,
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)

Stephan

restart:
M(x):=piecewise(x<=l,1/2*(q*x^2)/(EI)-3/8*(q*l*x)/(EI),l<x,1/2*(q*x^2)/(EI)-13/8*(q*l*x)/(EI)+5/4*(q*l^2)/(EI)):
M(x):=M(x)*(-EI);
# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:
M(x):=piecewise(x<=l,1/2*(q*x^2)-3/8*(q*l*x),l<x,1/2*(q*x^2)-13/8*(q*l*x)+5/4*(q*l^2));

## Multi-dimensional matrices/arrays...

Hi there,

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

M[n+1]=(b·theta^(m)·R[n])/(theta^(m)+R[n]^m)

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?

Thanks,

jon

## Define a set of functions by means of for loops in...

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

printlevel:=2;

# Node coordinates.
N_x:=5;
N_y:=4;
N_elx:=N_x-1;
N_ely:=N_y-1;
h_x:=(x_e-x_s)/N_elx;
h_y:=(y_e-y_s)/N_ely;
x_n:=[seq(x_s+j*h_x,j=0..N_elx)];
y_n:=[seq(y_s+j*h_y,j=0..N_ely)];

# 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
phi[j,k]:=(x,y)->(x-x_n[j-1])*(x-x_n[j+1])*(y-y_n[k-1])*(y-y_n[k+1])/((x_n[j]-x_n[j-1])*(x_n[j]-x_n[j+1])*(y_n[k]-y_n[k-1])*(y_n[k]-y_n[k+1]));
od;
od;

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
﻿