Items tagged with function function Tagged Items Feed

This might be a ridiculous question, but what is the easiest way to check the monotonicity of a function? I didn´t find anything helpful in the Maple Help, so maybe one of you could give me a nudge here :)

Hello

 

I am new to Maple, and I would like to get some help. Thank you.

I have an assignment where I had to make a power-regression of some numbers. 

 

Now, I did this. I got this  1,18971*x*0,38480

 

 

The next task is to make a prognosis (lol, I don't know how to say that in english), but I had to get to know what x = 17.

Ussualy, you would just put 17 in your function and then calcuate what x=17 is.

 

Now, I want to know if there's a method in maple where you can solve what x=17 is.

 

The reason i ask is because our assignment is a "Maple-assignment" so if there's a solve-function, then please let me know.

 

I appreciate your help.

 

 

Dear all,

I want to plot for example cos(theta) from 0 to 2*Pi inside a circle at a radius R. The axis theta of the ploted function is at a radius R.

Is it possible ?

Thanks

I am performing the int operation on an experssion but it does not consider constants to be constants. For example, maple is considering this constant namely, f'(-1) or eval(diff(f(x), x), x=-1) as a function and henceforth does not give the desired output. Please tell me how to make eval(diff(f(x), x), x=-1) as a constant function or to say, how to convert any given function in to a constant function.

Thank you for your time and help!

I have sum representation,

N:=3

 

I tried evaluating at t = 0 or t = 1, it does nothing when I entered f(0)[2]; it returns

 

 

I have a big system, so the loop is necessary for the assignment.

hi everyone.how can i write a function or procedure or summation so that i can write down the following polynomial ? i just want to create a set of polynomials which their summation of power ( power of x + power of y ) be less than three or equal to three ? the coefficients priority is not important , for example it is not important that a1 multiplies to x or y , i just want to create this polynomial with some coeeficients. tnx for help

``

restart:

a[9]*y^3+x^3*a[8]+x^2*y*a[5]+x*y^2*a[7]+x^2*a[2]+x*y*a[4]+y^2*a[6]+x*a[1]+y*a[3]+a[0];

x^3*a[8]+x^2*y*a[5]+x*y^2*a[7]+y^3*a[9]+x^2*a[2]+x*y*a[4]+y^2*a[6]+x*a[1]+y*a[3]+a[0]

(1)

 

``

 

Download problem.mw

Hi,

 

I am new to Maple and have a problem when solving three equations with three variables. But when  I plug in into solve function then it gives no answer.

eqn1 := 24900 = A*exp(-X*1.293995859*10^22)+A*exp(-Y*1.293995859*10^22)+5852.27;

eqn2 := 6000 = A*exp(-X*1.293995859*10^22)+2422.929937;

eqn3 := 19100 = A*exp(-Y*1.293995859*10^22)+8275.199937;

Variables are [A,X,Y]

I currently have a function quadsum(n) that determines the [x,y] solutions of the above equation for an integer n. :

quadsum:= proc(n::nonnegint)
local
k:= 0, mylist:= table(),
x:= isqrt(iquo(n,2)), y:= x, x2:= x^2, y2:= y^2;
if 2*x2 <> n then x:= x+1; x2:= x2+2*x-1; y:= x; y2:= x2; end if;
while x2 <= n do
y:= isqrt(n-x2); y2:= y^2;
if x2+y2 = n then k:= k+1; mylist[k]:= [x,y] end if;
x:= x+1; x2:= x2+2*x-1;
end do;
convert(mylist, list)
end proc:

How would I alter this so that I get [x,y] for n= (5^a).(13^b).(17^c)(29^d) for non-negative integers a,b,c,d?

Dear,

I paste below a simple code illustrating what I want to do: interpolate a function from two lists . I wonder it is a very simple task but I the function and the graph I get don't match with the correct ones in the end (both are plotted below).

> y_data:=[0.5266426348e-1, 0.7090942099e-1, 0.9392192453e-1, .1228458380, .1598545751, .2107200296, .3127241088, .4144428927, .5679723063, .6817484378, .7973388763, .9326799232, 1.393259472, 1.493936979, 1.566845149, 1.624353545, 1.670898228, 1.708874880, 1.739919717, 1.765298377, 1.786042765, 1.803007037, 1.816897481, 1.828294327, 1.837670808, 1.845410531, 1.851823072, 1.857157571, 1.861614283, 1.865354162, 1.868506707, 1.871176289, 1.873447229, 1.875387839, 1.877053637, 1.878489894, 1.879733654, 1.880815343, 1.881760039, 1.882588494, 1.883317935, 1.883962726, 1.884534877, 1.885044474, 1.885500010, 1.885908668, 1.886276537, 1.886608800, 1.886909882, 1.887183573, 1.887433127, 1.887661351, 1.887870669, 1.888063180, 1.888240711, 1.888404854, 1.888557000, 1.888698365, 1.888830022, 1.888952911, 1.889067865];

> x_data:=[10, 53/5, 56/5, 59/5, 62/5, 13, 68/5, 68/5, 13, 62/5, 59/5, 56/5, 56/5, 59/5, 62/5, 13, 68/5, 71/5, 74/5, 77/5, 16, 83/5, 86/5, 89/5, 92/5, 19, 98/5, 101/5, 104/5, 107/5, 22, 113/5, 116/5, 119/5, 122/5, 25, 128/5, 131/5, 134/5, 137/5, 28, 143/5, 146/5, 149/5, 152/5, 31, 158/5, 161/5, 164/5, 167/5, 34, 173/5, 176/5, 179/5, 182/5, 37, 188/5, 191/5, 194/5, 197/5, 40];

inverted_pairs:=[seq([y_[i], x_[i]], i = 1 .. nops(y_))]; 

interp := LeastSquares(y_data, x_data, k_, curve = a*k_^3+b*k_^2+c*k_+d);

 

I've tried different kinds of interpolation methods. In this code I use LeastSquares() function. I'm sure it has a quick solution but I'm really stuck and would appreciate any help/advice.  

Thanks in advance!

 

 

PS: I didn't mention in above, but it is really important for me to get the associated function of the curve (e.g. ak_^3+bk_^2+ck_+d). I can get it using LeastSquares() function but with your code (where you use ArrayInterpolation()) the function is not generated in the end. Could you please indicate some way to do that? Thanks!

Hi,

I am trying to discretize a kernel of the form $K(x,y,t,s)$. I want to evaluate a four dimensional integral of the form

\int\int\int\int K(x,y,t,s)*h_m(x)*h_n(y)*h_p(t)*h_q(s) dsdtdxdy, where limits of integration are from 0 to 1.

$h_m()$ are function of one variable.

please suggest how to evaluate this.

thanks

 

Let a be som expression like
a:=t^2

Now how do I define a function using a.

f:=t->a
doesnt work

I've got the following piecewise function :

(x^2+y^2)^(alpha).arcsin(y/x) if (x,y) are in [-pi/2,pi/2]

0, (x,y)=(0,0)

1. How do I plot this function taking the alpha variable and the piecewise construct into account?

2. How can I check for points of discontinuity, indifferentiability from the plot/function itself?

 

 

Dear mapleprimes users,

I have a problem concerning this function:

Naief := proc(A::integer,B::integer, p::posint)
local x, a:= A mod p, b:= B mod p;

 for x from 1 to p-1 do
    if a^x mod p = b then return x end if
end do;
print(¨No solution.¨)

end proc

It works fine for what it should do, finding x for a^x = b mod p by inserting x from 1 to p-1 until it finds an
apprioperate x.

My problem is concerning its computation time, which I like to calculate with:

Codetools:- Usage(Naief(a,b,p), output = [cputime], quiet, iterations= 2^12)

The problem is that keeps repeating

alot even when a,b and p are immensely huge. I don`t know how to fix it, because I need real CPUtimes which increase
a,b and p increase. I get the idea that the values of the CPUtime are not realistic.

 

Thanks for the help!

 

 

 

Hi there,

I am trying to simulate the behaviour of an equation in the continuous domain for two different populations given a set of parameters.

The equations reads:

S(t) = exp(-alpha·D(t)-beta·G·D^2(t))

where alpha and beta are known (and are different for two populations of cells), and G may be:

Case 1: G=1

Case 2: G = (D1^2+D2^2+2*D1*D2*exp(-lambda*T))/D^2 (where D1=D/3; D2=2·D/3; and lambda is also known)

 

For the Case 1, I need to simulate for different values of D. Even if for the purposes of this case, D(t) = D0 (a constant); I would like to know how I would do it for a time-dependent D, for example,  D(t) = D0·t, with a varying D0, for example in the range [1..8].

For the Case 2, I need to simulate under different values of T (for example in the range [1..8]), letting D be a constant, known value. In this case, D(t) is a piecewise function:

D(t) =
= D/3 if t=0

= 2·D/3 if t=T
= 0 for any other t

I really don't know how to write the expression for S(t) in this case.

 

I guess I need an array to store as many instances of S as numbers of parameters I have (8 values for D0 int he first case, and another eight for T).

And besides, it needs to be a function of t (even if in the first case, it is not; I'd like to simulate as if it were).

 

So I am at a loss when it comes to writing the expressions of S(t), and having it evaluated (and its values plot in the same graph using a palette for differente parameter values) for say, t=0..100.

 

Attached is my attempt: Mapleprimes_LQ_model_simulation.mw

 

Any ideas?

Thanks,

jon

Hello,

I have a question: why does the following not work and how can I make it work:

f(x)*a*b;
subs(a*b=y,%);

The result is f(x) a b but I want f(x) y. What can I do? I also tried eval.


Thanks and best regards.

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