Items tagged with int

I have a problem integrating a solution from fsolve.   I read in another post on this forum that the solution was to use unapply.   This works if I then set up the integration as suggested (i.e., without giving the argument to the function), but not if you do it in a way that seems logical to me (i.e.,the first version of the int command marked ‘fails’ below.   if you can plot a function why can’t you integrate it ?).  

Anyway the real problem I have is if I want to use the solution found using fsolve as the argument of another function (h below) and then integrate that.  I assume the final line fails because of the same reason the initial attempt to integrate g(x) fails. However, I can’t figure out what the equivalent notation would be if I wanted to omit the ‘x’ variable.   I tried using unapply again, and also putting in quotes, but nothing works.

> restart;

> g:=unapply('fsolve(a*y^2-sin(y),y=2)',a);

> plot('g(x)',x=1..2);

> evalf(Int('g(x)',x=1..2));#this fails

> evalf(Int(g,1..2));#this works fine

> h:=x->x*sin(x);

> h(g(1.0));

> h(g(2.0));

> evalf(Int(h(g(x)),x=1..2));# this fails

I have a nonlinear function Q(a,b,c,d,x,y) and I'd like to get the optimum (x*,y*) for different values of (a,b,c,d). The usual sintax:

NLPSolve(Q(10, 1, 5, 2, x,y), x= 0 .. 50, y = 0 .. 50, initialpoint = {x = 2,y= .5}, assume = nonnegative) does not work when Q contains numerical integration, that is evalf (Int). I have no problem with the definite integral evalf(int). The problem is that most of the cases required numerical integration so I need the former expression.

I'd appreciate very much if someone could help me.

y := int(1/(-0.4016e-1*m^(2/3)-0.211e-3*m^(5/3)), m)

I have to  draw  plot m against y. I can draw plot y against m but i don't can draw plot m against y. Please help me.

Hello people in mapleprimes,


I cannot obtain a proper result from the following code.

a:=int(((beta/beta[1,2])^(-theta/(1-theta))-kappa[1]^(-theta/(1-theta)))*m*beta^(m-1),beta=0 .. kappa[1]*beta[1,2]);


Please tell me if you know how to have maple calculate it.


Thanks in advance.



Hi All, 


I'm trying to numerically solve a differential equation which has a numeric function in it. 

For example, consider the function f. 

f:=(r)-> evalf(Int( <some messy function>, <some range>)) ;  <- This can be solved numerically and returns an answer quickly. i.e

f(23) gives 102;


Now, I want to numericaly solve something like.

Eq:= diff(p(r),r,r) + diff(p(r),r) - f(p(r));

ICS:=D(p)(0.001)=0, p(0.001) = 3


dsolve will not attempt to solve it due to the numeric integration in f. Is there a way I can just use numeric techniques to solve this kind of problem?

Thanks in advance.  

hi,i am studying the maple most recent.But when calculating function integral,I ran into trouble.I hope to get your help.Here is the code I wrote, but it runs a very long time. How to effectively reduce the integration time?

Fourierf := proc (sigma, a, b, N) local A, A0, B, T, S, Ff; T := b-a; A0 := int(sigma, t = a .. b); A := int(sigma*sin(n*Pi*t/T), t = a .. b); B := int(sigma*cos(n*Pi*t/T), t = a .. b); S := sum(A*sin(n*Pi*t/T)+B*cos(n*Pi*t/T), n = 1 .. N)+(1/2)*A0; Ff := unapply(S, t) end proc;

f := proc (t) options operator, arrow; piecewise(t < .13*2.6 and 0 <= t, 100*t/(.13*2.6), .13*2.6 <= t and t < 2.6, 100, 2.6 <= t and t < 2.6*1.1, 0) end proc;

sigma := f(t);
a := 0;
b := 1.1*2.6;
s1 := unapply((Fourierf(sigma, a, b, 500))(t)/uw0, t);

s2 := unapply((Fourierf(sigma, a, b, 500))(t)/ua0, t);
A1 := (2*n+1)^2*Pi^2*(C3+1+sqrt(4*C1*C2*C3+C3^2-2*C3+1))/(8*C1*C2-8);
A2 := (2*n+1)^2*Pi^2*(C3+1-sqrt(4*C1*C2*C3+C3^2-2*C3+1))/(8*C1*C2-8);
g := -C2*Cww*(diff(s1(x), `$`(x, 2)))+Caa*(diff(s2(x), `$`(x, 2))+(n+1/2)^2*Pi^2*(diff(s2(x), x)));
f1 := -(1/2)*(n+1/2)^2*Pi^2*sqrt(4*C1*C2*C3+C3^2-2*C3+1)+C2*Cww*((D@@1)(s1))(0)-Caa*((D@@1)(s2))(0)+(n+1/2)^2*Pi^2*(C2-(1/2)*C3+1/2);

CN := ((2*(int(exp(-A1*x)*g, x = 0 .. t)-f1))*exp(A1*t)-(2*(int(exp(-A2*x)*g, x = 0 .. t)-f1))*exp(A2*t))/((n+1/2)^3*Pi^3*sqrt(4*C1*C2*C3+C3^2-2*C3+1));
ua := sum(CN*sin((n+1/2)*Pi*z), n = 0 .. 100);



Maple 2016.

Why does


Causes mserver.exe to hang into a loop at full CPU and maple hangs?

Windows 7, 64 bit.  Even using timelimit() on it, it still hangs exceeding the time limit and never return. I have to kill mserver.exe or exit Maple to recover.

Hello dears! Hope all you are fine. I am facing problem to integrate some expression please see the attachment and fix the problem. I am very thankful for your favour.

Mob #: 0086-13001903838


I have a maple code, which some expressions have more that 80000 terms and I need to double integrate them. The terms have sine, cossine trigonometric functions.

I tried to used de MAP command, it works for the first expressions but, after a while, Maple displays an error message related to too large expression.

Do you know how to handle large expressions ?

Thank you.

ptin the file I upload is a complicated expression containing θ and r. Will the accuracy of the result be affected if I use the second method in the file to calculate the definite integral?


Hello, i am doing some schmidt-analysis on a stirling engine, but my question is rather simple. I have the measured presure P at a given time T as a 229x2 matrix, i also have a function, V__total(T), for the total volume of the engine at a given time T. 

I then go on to create a pointplot PV, which is rougly the shape of a potato. I now want to find the area enclosed by this point plot, is there any way? 

I do something like:

> DATA:=ImportMatrix(filepath,skiplines=1); %import data from .txt file, skip header line. 

>P:=DeleteColumn(DATA,1); %Isolate presure column

>T:=DeleteColumn(DATA,2); %Isolate time coliumn

>V:=V__total~(T); %Generate volume vector as a function of time T


Is there any wat to finde the area enclosed by the curve/ Int(P,V)

This is the code which derives from works but doesn't work and the differences between two codes are two new function I added to the dsolve which are η(t) and I2(t). The I2(t) is the second part of I1(t) at the interval t>t* which subject to Phi(t*)=0.

So how to make the sentence 'if |(H(t))/(omega)|>1 then eta(t)=0 else eta(t)=arccos(-(H(t))/(omega))' and 'I2(t) = (int(p(t), x = -eta(t) .. eta(t)))/Pi' work?


I have in mind


My unsuccessful trials are

evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01akc));

Error, (in evalf/int) NE_QUAD_MAX_SUBDIV:
  The maximum number of subdivisions has
  been reached: max_num_subint = 500


evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01akc, methodoptions = [maxintervals = 2000]));

Error, (in evalf/int) NE_QUAD_MAX_SUBDIV:
  The maximum number of subdivisions has
  been reached: max_num_subint = 2000


evalf(Int(cos(log(x)/x)/x, x = 0 .. 1, method = _d01ajc));

Error, (in evalf/int) NE_QUAD_NO_CONV:
  The integral is probably divergent or slowly convergent.

Mathematica cracks it without any options, producing 0.323367.




Digits :=30: m := 4: g :=0.3: nu := 0.4: a := 1:k:=0.2:

W:=cos(n*2*evalf(Pi)*( r-k*a)/((1-k)*a)):

ODE:=((2*(diff(W, r, r, r, r))+2*(diff(W, r, r, r))/r-4*(diff(W, r, r))/r^2+4*(diff(W, r))/r^3-(2*(1-nu))*(diff(W, r, r, r))/r+(4*(1-nu))*(diff(W, r, r))/r^2-(4*(1-nu))*(diff(W, r))/r^3)*r*(1+g*r/a)^3+(2*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*(1+g*r/a)^3+(6*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*r*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*r*(1+g*r/a)*g^2/a^2-((2*(diff(W, r, r, r)+(diff(W, r, r))/r-(diff(W, r))/r^2))/r-(2*(diff(W, r, r)+(diff(W, r))/r))/r^2-(2*(1-nu))*(diff(W, r, r, r))/r+(2*(1-nu))*(diff(W, r, r))/r^2)*r*(1+g*r/a)^3-((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r)*(1+g*r/a)^3-(3*((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r))*r*(1+g*r/a)^2*g/a)/(2*(diff(W, r, r))*r+2*(diff(W, r))) :

for i from 1 to m do  for j from 1 to m do
end do:end do:

why when maple cant solve the following?

1 2 3 4 5 6 Page 1 of 6