Items tagged with function function Tagged Items Feed

Hello, 

I am trying to get W(x,y,y')=y*y'/x

I am trying 

omega:=(x, y(x), (diff(y(x),x)))-> (y(x)*(diff(y(x), x))/x);

but get 

Error, invalid parameter; functional operators require their parameters to be of type symbol or (symbol::type)

 

Can anyone help me out?

 

thank you

Hello,

I use a map() command to get the values of function for each element of vector. Here is an example of a simple task:

restart:

A:=[1,2,8];

f1:=x->2*x;
f1_table_A:=Vector([map(f1,A)]);

I would like to do the same with piecewise function but it doesn't work. Here is an example:

restart:
with(plots):
f:=2*x:
g:=x^2:

h:=x->piecewise( 0<=x and x<= 5, f, 5<x and x <= 10, g ) ;
A:=[1,2,8]:
h_table_A:=map(h,A):

Is it possible to work with piecewise function? Maybe someone has an idea how to do it in different way?

Kind regards,

Iza

Perhaps the question is trivial, but I could not find the solution.

I am solving numerically an ODE (e.g., a simple harmonic oscillator) with the righthand side that contains a random part. For example it is

eq:=diff(a(t),t,t) + a(t) = (1+0.01*R(t))*cos(5*t);

where R(t) is a random function of t. How can I make such a function?

The naive attempt: 

eq:=diff(a(t),t,t) + a(t) = 3.*(1+0.1*rand()/1000000000000.)*cos(5.*t);


gave me a fixed (while random) value, e.g.

...

But, I need this coefficeint to be random each time step.

Any suggestions are very welcome!

 

 

 

Hello,

I have a two variable function d(a,b) which i don't want to substitute for the result. How can I make this product distributive,e.g. d(a+b,c)=d(a,c)+d(b,c) with independece of the variables I introduce in the function?

Thank you for the help!

Hi guys,

 

i want to find d'alembertian of a function of Ricci scalar (f(R)) , but it seems something is wrong .

 

f(R).mw

 

thanks in advance

Hi!! i am working on assignment.

h:= x-> (x^17-x*sin(x^16))/x^49+exp(sqrt(x+8))*ln(abs((cos^4*(x)-5)));

 

i want to find the value of the h(10)

i use eval , but it comes out a function, not a solution.

please.help!!

Hi,

 

I have a problem with creating a function contains n-dimensional independent variables with random function .. The function looks like:

f(x)=sum(U[i] * abs(x[i])^i,i=1..n)

where U is a random between 0 and 1

 

For 1-dimensional problem, it will be like:

f(x)=U*abs(x)

The plot by MATLAB will be:

 

While, for 2-dimensional problem, it will be like:

f(x[1],x[2])=U[1]*abs(x[1]) - (-U[2]*abs(x[2])^2)

 

and the plot with MATLAB will be:

 

The MATLAB code is:

x1min=-5;
x1max=5;
x2min=-5;
x2max=5;
R=1000; % steps resolution
x1=x1min:(x1max-x1min)/R:x1max;
x2=x2min:(x2max-x2min)/R:x2max;

for j=1:length(x1)

    % For 1-dimensional plotting
    f1(j)=rand*abs(x1(j));

    % For 2-dimensional plotting
    for i=1:length(x2)
        fn(i)=f1(j)+rand*abs(x2(i))^2;
    end

    fn_tot(j,:)=fn;

end

figure(1)
plot(x1,f1);


figure(2)
meshc(x1,x2,fn_tot);

 

 

I have used Maple because of its great graphics and animation, and for the mathematical analysis capability. However, to animate the above problem for 1- and 2-dimensional problems, I always fail!

My attempt has been just successed to plot 1-dimensional problem (without animation) .. And it tooks long-time with many codes!

restart;

X := Statistics:-RandomVariable(('Uniform')(0, 1));
R := Statistics:-Sample(X, 1000);

Vect := abs(Vector[column]([seq(0 .. 10, 10/999)]));

V := `~`[`-`](Vect, 5);

with(LinearAlgebra);
Mat := Multiply(V, R);

with(ArrayTools);
f := ArrayTools:-Diagonal(Mat);

F := abs(f);

Axis := Transpose(V);

f5 := plot(Axis, F, style = line);

 

And finally I got the graph:

 

But the problem is:

How can I animate it? Maybe I need to express it with new Maple code?

How can I plot and animate it when n=2?

 

Thanks

Hello

 

How do I define this function? s(t) = 5*t1/2

This function shows the pace of a particle. I have to decide the time when the pace of the particle is 2 m/s

 

help 

Hi,

Is it possible to use the command MatrixFunction with two matrices as:

with(LinearAlgebra):

A := Matrix([[-13, -10], [21, 16]]); B := Matrix([[3, 0], [21, 16]]);

BesselY(A,B) ?

In the maple help we can do the calculation only for one matrix as:

MatrixFunction(A, sin(x), x);

Thank you

Hello. My question is in the attached file.

Question.mw

Dear All,

I am new to maple and trying to write a recursive function with two input variables, but when i execute the statement it shows error "Error, (in B) too many levels of recursion"

Following is the set of instructions which i am trying to execute:

if n=1 then  

B(m,n):=omega(m);  

else  

B(m,n):=sum(omega(j)*B(m-j,n-1),j=1..m-1)

end if


After execution, i try to access B(1,1) or B(2,1), the following error occurs

B(1, 1);
Error, (in B) too many levels of recursion


I'll be grateful, if someone can help me to fix this problem. 

I have an arrays of data. One for x values, and one for y values. How can I obtain a numerical integration of y for a range of x values?

I have tried defining a function of X using ArrayInterpolation(x,y,X) and then calling evalf(Int(f,xmin..xmax)) but that gives an error message. (I don't seem to be able to paste into this window) The error message says

"Error, invalid input: evalf expects its 2nd argument, n, to be of type posint, but received numeric."

I thought I was using a form of the equation right from the help system.

I also tried the 2D version of integration, but it returns the difference of my limits times my function name.

I aslo tried AdaptiveQuadrature, but I can't get that to work either.

-Mike McDermott

Newbie Maple user

 

 

https://drive.google.com/file/d/0Bxs_ao6uuBDUVkE1b2pmcnljcnc/view?usp=sharing
https://drive.google.com/file/d/0Bxs_ao6uuBDUbE56R3Z1c0tLRkE/view?usp=sharing

restart;
changering := proc(Equation1, f3,g3)
g1 := (x,y)-> f3;
f1 := (x,y)-> g3;
h:=subs(g=g1, Equation1);
h:=subs(f=f1, h);
h:=subs(0=0, h);
return h;
end proc:
Eq1 := f(x,g(x,y)) + f(x,y);
h2 := changering(Eq1,x+y, x+y);
h2;

g1 := (x,y)-> x+y;
f1 := (x,y)-> x+y;
h:=subs(g=g1, Eq1);
h:=subs(f=f1, h);
h:=subs(0=0, h);

 

f(x, g(x,y)) + f(g(x,y), y) >= f(g(x,y), g(x,y))
f(x, g(x,y)) + f(x, g(x,y)) >= f(g(x,y), y)

f(x, g(x,y)) + f(x, g(x,y)) >= g(f(x,y), y)

f(x, g(x,y))*f(x, g(x,y)) >= f(g(x,y), y)

how to create a combinations of function of another function in maple

I would like to get some sort of table (maybe also a plot) that shows me the effect on the function if I change a variable.

For example, I have f(x,y,z)=x+yz

Now I would like to get a list with the results for f if I run z from, say, -10 to +10.

Is it also possible to do this with all variables at the same time?

1 2 3 4 5 6 7 Last Page 2 of 26