489 Reputation

16 Badges

10 years, 316 days

MaplePrimes Activity

These are answers submitted by Alger

One method with polynomial fit

restart: with(Statistics):with(plots):X := Vector([2019, 1546, 1298, 1157, 1052, 963, 901, 852, 802, 780, 747], datatype=integer):
Y := Vector([0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000], datatype=integer):
fit1:=Fit(a+b*t+c*t^2+d*t^3, X, Y, t);
points:= {seq([X[i],Y[i]],i=1..11)}:



This is an example from help of Maple


You must write it like in the help

Your error is DE1 := diff(y(t),t) = y(t)-t^2+1;


If I understand, you want:

return round(y)

For the first question:

assume(x1::real, x2::real, y1::real, y2::real):


You can do:

assume(diff(V(q),q)>0,diff(diff(V(q),q),q)<0); d1:=diff(V(q),q); d2:=diff(diff(V(q),q),q);d1*d2; # d1*d2 for example


d1:=diff(V(q),q); d2:=diff(diff(V(q),q),q);d1*d2 assuming d1>0, d2<0; # d1*d2 for example


The unknown in your differential equation is y(x) and not x.

restart:deq := diff(y(x), x) = y(x)/(x*(ln(x)-ln(y(x))));


To verify the solution you have to eval deq for the solution:


The MTM package do the problem of subs when you with(MTM) is before subs. I don't know why. For your calculation, you don't need it, I think.



The first jprime is a scalar and the second is a vector. What is the value of jprime[2];

Those are errors. lambda is matrix and must be declared.



add t:=t1*Unit(s); before expression of x and replace plot(x, t); by plot(x);


First: j:=jprime[2] is always equal to 0 and then while j<=15 never stops. You must declare your vector and matrix: lambda, jprime. There are some errors in your code.

Second: Declare Cat2:=Vector(2) and your subs must work


If I understand your question

plot3d(tan(x*sqrt(cp^2/3220^2-1))*(cp^2/3220^2-2)^2+4*tan(x*sqrt(cp^2/6450^2-1))*sqrt((cp^2/3220^2-1)*(cp^2/6450^2-1)), x = 0 .. 14, cp = 0 .. 7000);


To select from [4,8] to [5,3], do list[3..6];

[[4, 8], [5, 7], [8, 1], [5, 3]]


f:= x-> x-2^(-x);
> a:=0; b:=1;
>  while b-a> 0.00001 do
>       m:= (a+b)/2:
>       if evalf(f(a)*f(m)) > 0 then a:= m: else b:=m: end if:
>         print(a,b);
>       end do:

Hi Oliver K 946

The objective function is the variation of the function f (function ripple) : f[max]-f[min])/fmoy.

Hi hirnyk 497

First, thanks a lot for your reply and help.

In my example, it is not necessary to have f[max]=-f[min].

The problem is in NLPSolve or Search, the objective function f[max]-f[min])/fmoy is constituated with three variables in the same time with respet to ranges and constraints and are not separables, I think.

If you look in your programm, a, b, c, .. for fmax, fmin, and taux are different.

I must get a unique a, b, c... for objective function which is f[max]-f[min])/fmoy.

Search or NLPSolve must calculate at the same time with values of constraints and ranges, fmax, fmin, fmoy and f[max]-f[min])/fmoy and to minimize it and then to give the values of parameters.

Best regards



You should take a look at ?plot/options, in particular at the third example given on that help page.


experiment this


First 6 7 8 9 Page 8 of 9