Items tagged with function

How to realize the Cantor staircase function in Maple? Mathematica has it.

I'd like to stress the three desired properties:

(i) The virtual Cantor function can be evaluated to arbitrary numerical precision.

(ii) For certain arguments, this function automatically evaluates to exact values.

(iii) Mathematical function, suitable for both symbolic and numeric manipulation.

I want to obtain the taylor series of a function say sin(x) at x=0 up to infinity. I mean that I don't want a trauncated series. I tried using "series" and "taylor" but they just give the truncated series.

Hello,

I am trying to write 

D= d/dx + y1*d/dy + y*y1/x*d/dy1 

So that I can apply D to some function L(x,y)

But I don't know how to write the derivative like this without them operation on a function. Can somebody help me? 

Thank you

 

So I am trying to apply the Optimization function to a rather complicated problem I am currently working on, and having some trouble getting maple to cooporate. This is the part of the code that is giving me the error, with error included. All of the variables imputtet when calling OptimizeSpring are constants. If there is any other details I should add, please say so and I will add them promptly :) Thanks alot!
Maple problem

I suspect that it might be related to this suggestion, but I am not sure how to apply it http://www.mapleprimes.com/posts/95113-Optimization-Workaround-For-Operator-Form

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. 

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