# Items tagged with intint Tagged Items Feed

### How to put 'if' into dsolve?...

November 17 2015
0 4

This is the code example_hw2.mw which derives from hw2_I1.mw.

hw2_I1.mw works but example_hw2.mw 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?

### How to calculate that integral?...

November 10 2015
0 14

I have in mind

.

My unsuccessful trials are

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

The maximum number of subdivisions has
been reached: max_num_subint = 500

and

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

The maximum number of subdivisions has
been reached: max_num_subint = 2000

and

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

The integral is probably divergent or slowly convergent.

Mathematica cracks it without any options, producing 0.323367.

### Numerical Amounts of Definite Integrals...

September 23 2015
0 2

------------------------------------------------------------------------------------------------------------------------------

restart:

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
C[i,j]:=int(subs(n=i,ODE)*subs(n=j,W),r=k*a..a)
end do:end do:

### Why can't Maple calculate it?...

September 15 2015
1 5

why when maple cant solve the following?

### Slow and not accurate...

September 07 2015
1 9

restart: with(plots):
H := a -> piecewise(a>=0,1):
f1 := y->(H(y-1*Pi)-H(y-2*Pi))*sin(y)^2:

g1:=(f1(y)/sqrt(4*Pi*t))*(sin((x-y)^2/4/t+Pi/4)-sin((x+y)^2/4/t+Pi/4)):
g2:= int(g1, y= 0..100):

g3:= diff(g2,t):
g4:= diff(g2,x\$2):
g5:= (g3^2+g4^2)/2:
E2:= unapply(Int(g5, x= 0..100, epsilon= 1e-4, digits= 7), t):
CodeTools:-Usage( plot(E2, 0..20, numpoints= 50, labels= [t, E]));

The above mentioned code should give constant figure, but it takes a lot of time and not accurate.

If you can help me to improve these codes, I would be pleased.

Thanks!

### Why cannot I plot it?...

August 20 2015
3 12

I need a help about running the following codes..

restart:
d:=1:
s:=0.8:
c1:=sqrt((s)/Pi/r^3)/2 * (-sin(r*(u-1)^2/4/(s)+Pi/4)+sin(r*(u+1)^2/4/(s))/sqrt(2)):

c22:=-((u+1)/(4*Pi*r*sqrt(y-1)))*(exp(-r*y*(u+1)^2/(8*s)))*(sin(r*y*(u+1)^2/8/(s*(y-1))+Pi/4)/2+sin(r*y*(u-1)^2/8/(s*(y-1))+Pi/4)):
c2:=Int(c22, y= 1..100):

c33:=(sin(r*y*(u+1)^2/8/(s*(y-1))+Pi/4)+sin(r*y*(u-1)^2/8/(s*(y-1))+Pi/4))*(((d*s)/(Pi*(r^2)*y*sqrt(y-1))*exp(-r*y*(u+1)^2/8/s))-((d^2*sqrt((2*s^3)/(Pi*(y-1)*y^3*r^5)))*exp(d*(u+1)+(2*d^2*s)/(y*r))*erfc((r*y*(u+1)+4*d*s)/(2*sqrt(2*s*r*y))))):
c3:=Int(c33, y= 1..100):

g1:=c1+c2+c3:
g2:= unapply(Int(g1, r= 1..infinity, epsilon=1e-4,digits=7),u):
plot(g2, 0..10, numpoints=100);

Thank you!

### How to integrate the function...

August 18 2015
1 3

Dear All

I am trying to integrate a function, however Maple is not giving me the results. I have tried to use int as well as evalf however I am still not getting the results.

I would be grateful if you could please suggest me a way out. I have attached the maple file for your reference.

ThanksExample.mw

### a few integrals in Maple...

June 13 2015
1 6

Trying a few integrals in Maple -- doesn't seem to handle them very well. Any workarounds please?

f1(p,b):= 1/(p^2 + b^2)^2 ;

f2(p,b):= exp(-p/b)^2;

T1pbm := Int(q*f1(q, b)*ln((p+q)^2+m^2), q = 0 .. infinity);

T2pbm := Int(q*f1(q, b)*ln((p-q)^2+m^2), q = 0 .. infinity);

with(IntegrationTools):

PT1 := evalf(Parts(T1pbm, q*f1(q, b), ln((p+q)^2+m^2)));

PT2 := evalf(Parts(T2pbm, q*f1(q, b), ln((p-q)^2+m^2)));

Ev := evalf(-pi*c*Int*(p*f1(p, b)*(PT1-PT2), p = 0 .. infinity))

### How to integrate this expression in maple...

May 20 2015
1 10

Hello Everyone

I have an expression which I wish to integrate. I would be grateful if you could please help me with it. I have uploaded the maple file for your refrence.

Thanks a lot for your time.

IntegrationExample.mw

### Can't figure this out...

April 06 2015
1 7

Consider

> z := Int(f(t-s), s=0..1);

The result is clearly a function of t (and definitely not a function of s, which is a dummy variable).  Let's define

> F := unapply(z, t);

Then

> F(q);

as expected.  However:

> F(s);

which is not correct, as this confuses the argument s of F with the dummy integration variable s.  How would you salvage the situation?

### Problem with integration....

April 06 2015
0 11

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!

### Why does Maple not use the +C at the end of an ind...

April 04 2015
0 4

We're starting on indefinite integrals in my 1st year calculus class.

A quick example would be int(sin(x), x);=-cos(x)+C

Maple doesn't add the +C on the end of it's solution. Can someone explain or point me to a resource? I've tried searching but I can't find an answer.

### An unknown error int command to use...

February 19 2015
2 4

Hi number of officials,

As I enter the command defined 'int' I get an error message.

What can I do. Can you help me.

Commands Entered:

int(x^2+3*x, x);

ansvers:

Error, (in int) wrong number (or type) of arguments: invalid option value passed to indefinite integration: {}

### How do i solve integration of odes using composite...

February 13 2015
1 5

hai everyone. i am currently trying to solve an integration of the following ∫g(η)dη . integrate from 0 to 10.

from the following odes.

f ''' +1-(f ')2 +ff ''=0,

g''-gf'+fg'=0,

with boundary conditions f(0)=0, f'(0)=λ, f'(∞)=1, g(0)=1,g(∞)=0

First, i solve the odes using the shooting method. then i used the trapezoidal rule to solve for the integration of g(eta) using the following codes

> with(student);
> trapezoid(g(eta), eta = 0 .. 10, 10);
> evalf(%);

it seems that it can not read the data from the shooting method. can anyone suggest why it is happening?

thank you verymuch for your concern :)

### Expected Value of a function...

January 08 2015
0 2

Hello people in Mapleprimes,

I want to do calculations about an expected value.

For example,

expectedvalueofc.pdf

that is, \int_a^b c d \Omega

where, \Omega is a distribution function of c.

But, I don't know whether this equation can be put into worksheet.

Is there no way other than writing this as

\int_a^b c g(c) dc,

where g shows a probability density function.

Can I use Statistics[ExpectedValue] to calculate expected value with a general distribution function, not specified

to normal distribution?

I hope you will give me some hints.

Best wishes.

 1 2 3 4 5 Page 1 of 5
﻿