Items tagged with int int Tagged Items Feed

int(int(y, 0 <= y, x^2+y^2+z^2 <= 1));

Error, (in int) integration range or variable must be specified in the second argument, got 0 <= y

int(int(y, y = 0, x^2+y^2+z^2 = 1));

Error, (in int) integration range or variable must be specified in the second argument, got y = 0

Hi all

kx,ky is the wavenumber, how can I get the 4 cases of piecewise function according to kx=0,kx≠0 and ky=0,ky≠0. Thanks

J := `assuming`([4*(int(int(JJ*exp(-I*(kx*x+ky*y))*sin(2*l*pi*x/a)*sin(2*k*pi*y/b), x = 0 .. a, AllSolutions), y = 0 .. b, AllSolutions))/(a*b)], [k::posint, l::posint, a > 0, b > 0, JJ > 0])

Hi all

Assume that we have following vectors:

> V1 := [1/9, -5/9, 7/9, 1/9, -5/9, 7/9, 1/9, -5/9, 7/9];

>  V2:=t*V1;

and we want to compute the integral of V2, namely:

>  Int(seq(V2[i],i=1..9),t=0..1);
>

            [       5 t  7 t         5 t  7 t         5 t  7 t]
      V2 := [t/9, - ---, ---, t/9, - ---, ---, t/9, - ---, ---]
            [        9    9           9    9           9    9 ]

Error, (in print/Int) invalid input: IntegrationTools:-GetOptions expects its 1st argument, v, to be of type Integral, but received Int(1/9*t,-5/9*t,7/9*t,1/9*t,-5/9*t,7/9*t,1/9*t,-5/9*t,7/9*t,t = 0 .. 1)

 how we integrate from V2? why answer is wrong in my code?

thanks a lot

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

I have a great problem with this integral and Maple gives two answers completely different:

 

int(x^-5/3*cos((x-1)*h), x = 0..infinity)

so I get two different results :

 

-(27/8)*h^2+3/2+(27/8)*h^(7/6)*LommelS2(11/6, 1/2, h)

 

or this:

 

-(27/8)*h^2+3/2+(27/8)*h^(7/6)*LommelS1(11/6, 1/2, h)

In the first integral A get Lommels2 and If I get the Integral by using Taylor of cos((x-1)*h) and after that I resum I get Lommels1.

 

Thank you.

 

 

my int is in below.

my_int.mw

my int has hyperbolic and trigonal parts thus when they are multiplied , Maple is not able to integrate!

 

Now, How can I solve this integral?

thank you for help

my int is:

 

``

restart

eq1 := m*(diff(diff(w(x, t), t), t))+diff(diff(EIy*(diff(diff(w(x, t), x), x))+(EIz-EIy)*(diff(diff(w(x, t), x), x))*(theta(x)+phi(x, t))^2, x), x)-Pz = 0

l := 16; m := .75; EIy := 0.2e5; EIz := 0.400e7; GJ := 0.1e5; mj := .1; Pz := 5000; Mz := 0; theta := proc (x) options operator, arrow; 0 end proc

w := proc (x, t) options operator, arrow; q[1](t)*(cosh(1.8751*x/l)-cos(1.8751*x/l)+(-1)*.734096*(sinh(1.8751*x/l)-sin(1.8751*x/l)))+q[2](t)*(cosh(4.6941*x/l)-cos(4.6941*x/l)+(-1)*1.01847*(sinh(4.6941*x/l)-sin(4.6941*x/l)))+q[3](t)*(cosh(7.8548*x/l)-cos(7.8548*x/l)+(-1)*.999224*(sinh(7.8548*x/l)-sin(7.8548*x/l))) end proc

phi := proc (x, t) options operator, arrow; q[4](t)*sqrt(2)*sin(1.5708*x/l)+q[5](t)*sqrt(2)*sin(4.7124*x/l)+q[6](t)*sqrt(2)*sin(7.8540*x/l) end proc

NULL

f[1] := int(lhs(eq1)*(cosh(1.8751*x/l)-cos(1.8751*x/l)-.734096*(sinh(1.8751*x/l)-sin(1.8751*x/l))), x = 0 .. l)

``

Hi all,

As we know that the indefinite integral in Maple is defined up to a piecewise constant.

For example,

 

Due to the indeterminate range of variable n, int returns the piecewise function.

But in the other similar case, we get a generic solution rather than a piecewise function,

 

Why not to returns the result like this,

 

Thanks for any help.

I have an expression like this:

Since it is linear I want Maple to rewrite it into this:

(with the benefit that Maple then can solve it at least up to a point). i have tried to conceive a rule to do that but got stuck relatively quickly. Does anybody have a way to do this (in some genrality)?

Thanks,

Mac Dude.

 

limit(t*(int(exp(-t*tan(x)), x = 0 .. (1/2)*Pi)), t = infinity)?

Is it possible to find it in Maple? The command

MultiSeries:-limit(t*(int(exp(-t*tan(x)), x = 0 .. (1/2)*Pi)), t = infinity);
outputs
.

 

restart:with(plots):

h3:=((1+lambda*m*x/a0+phi*((4/Pi*sum((-1)^(n+1)/(2*n-1)*cos(2*Pi*(2*n-1)*x),n=1..infinity)))));

q:=Q-1:

f:=sin(alpha)/E;

DP3:=Int(f-((q*(k+1)*(k+2))/((1-tau)^(k+1)*((h3^(k+2)))*(k+1+tau)))^(1/k),x=0..1);

E:=0.2:phi:=0.2:alpha:=0.1:k:=1:lambda:=0.1:a0:=0.5:m:=0.1:tau:=0.1:

plot((DP3),Q=0..1,axes=box,linestyle=1,color=[red]);

I am unable to plot DP3 vs Q, not only it take very long time but didn't give any output.

Please have a look.

 

Cheers!

 


firstly apologies in advance for stuff in this question such as "triangle symbol",  my computer is pretty old. 


ok so i was confused a bit here, what i'm trying to do is write a maple procedure that computes Af for a given f contained in V . except we only need to correct the bug in the script below. This script demonstrates such a procedure in the case that omega is a square. The domain is given here as the negative set of a function F contained in V .  I have left in notes where/what i think we need to do but i dunno how to...

N:=10 ; # Global Var
F:=(x,y)->sgn(abs(x-N/2)+abs(y-N/2)-N/4);
Average := proc(F, f0) local f, i, j;
f := f0; # !!!!!!!!!!!!!! something is bad here...
for i to N do for j to N do
if F(i, j) < 0 then
f[i, j] := (f0[i - 1, j] + f0[i + 1, j] + f0[i, j + 1] + f0[i, j - 1])/4 ;
end if;
end do;end do;
return f;
end proc;
f0:=Matrix(N,F); # just to have something to test the procedure
Average(F,f0); # does not return the expected average, modifies f0

 

the necessary information we were given to produce this so far was..

Let N be a positive integer and [N] = {i contained in N | 1<= i <=N }  Let "Omega" C {(i,j) contained in [N] x [N] | 2<=i,j<=N-1} be a subset. Let V = R^([N]x[N]) be the vector space of real valued functions [N]x[N] -> R
and A, "triangle symbol":V->V (average) and "triangle symbole" (Laplacian) be the linear maps such that
[Af](i; j) = f(i; j)      if (i; j) not contained in "Omega"   OR

                             [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 if (i,j) is contained in "Omega"

["traingle symbol"f](i,j) =  0 if (i,j) isnt contained in "Omega"   OR

                            ( f(i,j) - [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 )    if (i,j) is contained in "Omega"

 Please and thank you for any help in advance <3

                           

Hi all

I dont know why some Z1 appears on the screen and the code does not converge.
please help me
thanks alooooot


restart;
n:=3;
nn:=3;
m:=1;
BB:=1;
BINF:=5:
pr:=7;
digits:=10;
>
eq1:=diff(f(tau),tau$3)+((3/5)*f(tau)*diff(f(tau),tau$2))-(1/5)*(diff(f(tau),tau$1))^2+((2/5)*tau*diff(h(tau),tau$1))-((2/5)*h(tau))-BB*diff(f(tau),tau$1)=0;
eq11:=(1/pr)*diff(h(tau),tau$3)+(3/5)*f(tau)*diff(h(tau),tau$2)=0;

h(tau):=sum(p^i*h[i](tau),i=0..nn);
f(tau):=sum(p^i*f[i](tau),i=0..n);

 

H1:= p*(diff(f(tau),tau$3)+((3/5)*f(tau)*diff(f(tau),tau$2))-(1/5)*(diff(f(tau),tau$1))^2+((2/5)*tau*diff(h(tau),tau$1))-((2/5)*h(tau))-BB*diff(f(tau),tau$1))+(1-p)*(diff(f(tau),tau$3)):
H11:= p*((1/pr)*diff(h(tau),tau$3)+(3/5)*f(tau)*diff(h(tau),tau$2))+(1-p)*(diff(h(tau),tau$3)):
>
eq2:=simplify(H1):
eq22:=simplify(H11):
eq3:=collect(expand(eq2),p):
eq33:=collect(expand(eq22),p):
eq4:=
convert(series(collect(expand(eq2), p), p, n+1), 'polynom');
eq44:=
convert(series(collect(expand(eq22), p), p, n+1), 'polynom');
for i to n do
s[i] := coeff(eq4, p^i) ;
print (i);
end do:
for i to nn do
ss[i] := coeff(eq44, p^i) ;
print (i);
end do:
s[0]:=diff(f[0](tau), tau$3);
ss[0]:=diff(h[0](tau), tau$3);
ics[0]:=f[0](0)=0, D(f[0])(0)=0, D(f[0])(BINF)=0;
icss[0]:=h[0](BINF)=0, D(h[0])(0)=1, D(h[0])(BINF)=0;

dsolve({s[0], ics[0]});
f[0](tau):= rhs(%);
#dsolve({ss[0], icss[0]});
h[0](tau):= -exp(-tau); #;rhs(%);

>
>
for i to n do
f[ii-1](tau):=convert(series(f[ii-1](tau), tau, nn+1), 'polynom');
h[ii-1](tau):=convert(series(h[ii-1](tau), tau, nn+1), 'polynom');
s[i]:=simplify((s[i]));
ics[i]:=f[i](0)=0, D(f[i])(0)=0, D(f[i])(BINF)=0;
dsolve({s[i], ics[i]});
f[i](tau):=rhs(%);
ss[i]:=(ss[i]);
icss[i]:=h[i](BINF)=0, D(h[i])(0)=0, D(h[i])(BINF)=0;
dsolve({ss[i], icss[i]});
h[i](tau):=rhs(%);

end do;

f(tau):=sum((f[j])(tau),j=0..n);
with(numapprox):

 

plot(diff(f(tau),tau),tau=0..5,color=blue,style=point,symbol=circle,symbolsize=7,labels=["tau","velocity"]);
plot(pade(diff(f(tau),tau), tau, [7, 7]),tau=0..5,color=blue,style=point,symbol=circle,symbolsize=7,labels=["tau","velocity"]);

 

 

int(BesselJ(2, r*k)*BesselJ(1, 1500*k), k = 0 .. infinity);

(of course, calculated numerically) against r=0..40 ?

PS. It is possible in Mathematica 9.0.1.0 .

In a trivial example of where x goes from 0 to 1 of d n(x)/dx =a, where n(0)=1, n(1)=2, so that the integral is solved easily, how can i do this in maple however I can only solve an eqation with the initial condition, if i try anything else then i get errors such as, 

fx := diff(n(x), x)-a

A := rhs(dsolve({fx, x = 0 .. 1, n(0) = 1, n(1) = 2}, n(x)));

Error, (in dsolve) invalid terms in sum: 0 .. 1

 

 

 

Dear Maple enthusiasts,

I was debugging a piece of Maple code I wrote with 3 for loops in it, because Maple kept running infinitely when I executed the worksheet. I found out that in the inner most loop Maple was getting stuck on integrating a function with a discontinuity. However, at the same time I noticed another flaw, namely that it was integrating the negative part of that same function as well as the positive. I had forgotten to implement that Maple should only integrate the positive part of the function. 

So I thought the easiest way for Maple to integrate the function would be to use piecewise() to get rid of the negative part and then integrate the piecewise function. To test this, I temporarily changed the integration interval so that no discontinuity would be present. However, Maple runs for an infinite amount of time when it tries to integrate the piecewise function. Also, I still don't have a clue how to deal with the discontinuities that occur in the real integration interval (when using piecewise). 

Attached at the bottom of this message is the code taken from the inner most for loop. In italic it shows the "problem section" with the piecewise function. The plots were there to help me visualise the functions and what's happening. They'll be removed in the final code.

Can someone help me to try and get the integration of the piecewise function to work? The integration interval in the code is the real integration interval. The discontinuities occur there where peicewise makes the function zero.

Many thanks!

 

restart: with(plots): with(linalg): with(Optimization): with(ListTools):

Average percentage of sunhours per day in a certain month
Sun_jan:=0.735: Sun_feb:=0.715: Sun_mar:=0.67:
Sun_apr:=0.615: Sun_may:=0.64: Sun_jun:=0.56:
Sun_jul:=0.43: Sun_aug:=0.37: Sun_sep:=0.43:
Sun_oct:=0.715: Sun_nov:=0.81: Sun_dec:=0.74:

Constants
I_sc:=1367.7:
H:= 150:
t_D:=0:
lat:=evalf((9+24/60+27/3600)*Pi/180):
lon:=evalf((51/60+12/3600)*Pi/180):
LC:=evalf((lon*180/Pi-0)/15):
alfa_alt:=evalf(-0.83*Pi/180):

H_zeni:=1.2:
H_azi:=3.6:
N:=116:

E_year:=0:

Initialise all necessary collector and radiation variables

I_o:=evalf(I_sc*(1+0.0333*cos((2*Pi*N)/365))):
delta:=evalf(arcsin(0.39795*cos(0.98563*(N-173)*Pi/180))):
x_input:=(2*Pi*(N-1))/365.242:
EOT:=x->evalf(0.258*cos(x)-7.416*sin(x)-3.648*cos(2*x)-9.228*sin(2*x)):
ts_input:=t->t+EOT(x_input)/60-LC-t_D:
omega:=ts->15*(ts-12)*Pi/180:
omega_set:=evalf((arccos((sin(alfa_alt)-sin(lat)*sin(delta))/(cos(lat)*cos(delta))))):
ts_rise:=evalf(-(omega_set*180/Pi)/15+12):
ts_set:=evalf((omega_set*180/Pi)/15+12):
t_rise:=ts_rise-EOT(x_input)/60+LC+t_D:
t_set:=ts_set-EOT(x_input)/60+LC+t_D:
t_noon:=12-EOT(x_input)/60+LC+t_D:
alfa_elev:=omega->evalf(arcsin(sin(delta)*sin(lat)+cos(delta)*cos(lat)*cos(omega))):
theta:=alfa_elev->Pi/2-alfa_elev:
alfa_azitest:=evalf(arccos((sin(delta)*cos(lat)-cos(delta)*cos(omega(ts_input(t)))*sin(lat))/cos(alfa_elev(omega(ts_input(t)))))):

Calculate direct and normal intensity I with mathematical model on time t of day N

a_0:=0.4237-0.00821*(6-H*0.001)^2:
a_1:=0.5055+0.00595*(6.5-H*0.001)^2:
k_HCDmod:=0.2711+0.01858*(2.5-H*0.001)^2:
I_HCDmod:=theta->I_o*(0.95*a_0+0.98*a_1*exp(-(1.02*k_HCDmod)/cos(theta))):

theta_noon:=evalf(theta(alfa_elev(0))):
I_noon:=evalf(I_HCDmod(theta_noon))*3600: Zet I om van W/m² naar J/(m².uur) voor toekomstige integratie
I_HSmod:=evalf(I_noon*sin(((t-t_rise)*Pi)/(t_set-t_rise)));

Calculate the real radiation energy on the collector for a whole clear day N per (m²)

RF_morning:=evalf(sin(alfa_elev(omega(ts_input(t))))*cos(H_zeni)+cos(alfa_elev(omega(ts_input(t))))*sin(H_zeni)*cos(H_azi-alfa_azitest));
plot(RF_morning,t=t_rise-1..t_noon);

RF_afternoon:=evalf((sin(alfa_elev(omega(ts_input(t))))*cos(H_zeni)+cos(alfa_elev(omega(ts_input(t))))*sin(H_zeni)*cos(H_azi-(2*Pi-alfa_azitest))));
plot(RF_afternoon(t),t=t_noon..t_set+1);

I_real:=piecewise(RF_morning>=0 and I_HSmod>=0 and t<=t_noon,RF_morning*I_HSmod,RF_afternoon>=0 and I_HSmod>=0 and t>t_noon,RF_afternoon*I_HSmod);
plot(I_real,t=t_rise-1..t_set+1);

E_clear:=int(I_real,t=t_rise..t_set,numeric=true);

Apply the average sunhours per day to the radiation energy to go get the real I for an average day (same percentage per hour)

if N<=31 then E_av:=E_clear*Sun_jan elif (N>31 and N <=59) then E_av:=E_clear*Sun_feb
elif (N>59 and N <=90) then E_av:=E_clear*Sun_mar elif (N>90 and N <=120) then E_av:=E_clear*Sun_apr
elif (N>120 and N <=151) then E_av:=E_clear*Sun_may elif (N>151 and N <=181) then E_av:=E_clear*Sun_jun
elif (N>181 and N <=212) then E_av:=E_clear*Sun_jul elif (N>212 and N <=243) then E_av:=E_clear*Sun_aug
elif (N>243 and N <=273) then E_av:=E_clear*Sun_sep elif (N>273 and N <=304) then E_av:=E_clear*Sun_oct
elif (N>304 and N <=334) then E_av:=E_clear*Sun_nov elif (N>334 and N <=365) then E_av:=E_clear*Sun_dec end if:

E_av;

How can I get maple to integrate this expression numerically.

For a specific value 0<s<1 it should be enough to integrate from -40..40 instead of -infinity..infinity

Anyway. My maple version always hangs up :-(

(1/2)*(-4*dilog(-(exp(2*t)*s-(-s^2+1)^(1/2)+1)/(-1+(-s^2+1)^(1/2)))*exp(4*t)+arctanh((-1+s)/(-s^2+1)^(1/2))*s^2+arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*s^2+8*(-s^2+1)^(1/2)*exp(4*t)+4*dilog((exp(2*t)*s+(-s^2+1)^(1/2)+1)/(1+(-s^2+1)^(1/2)))*exp(4*t)+4*exp(4*t)*arctanh((-1+s)/(-s^2+1)^(1/2))-8*arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(4*t)*s^2*t-4*ln(1+(-s^2+1)^(1/2))*exp(4*t)*s^2*t+4*ln(1-(-s^2+1)^(1/2))*exp(4*t)*s^2*t-4*ln(exp(2*t)*s-(-s^2+1)^(1/2)+1)*exp(4*t)*s^2*t+4*ln(exp(2*t)*s+(-s^2+1)^(1/2)+1)*exp(4*t)*s^2*t+12*(-s^2+1)^(1/2)*exp(4*t)*t-16*arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(4*t)*t-8*ln(1+(-s^2+1)^(1/2))*exp(4*t)*t+8*ln(1-(-s^2+1)^(1/2))*exp(4*t)*t-8*ln(exp(2*t)*s-(-s^2+1)^(1/2)+1)*exp(4*t)*t+8*ln(exp(2*t)*s+(-s^2+1)^(1/2)+1)*exp(4*t)*t-(-s^2+1)^(1/2)*exp(2*t)*s+8*arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(2*t)*s+4*exp(2*t)*arctanh((-1+s)/(-s^2+1)^(1/2))*s-(-s^2+1)^(1/2)*exp(6*t)*s-8*arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(6*t)*s+4*exp(6*t)*arctanh((-1+s)/(-s^2+1)^(1/2))*s+2*dilog((exp(2*t)*s+(-s^2+1)^(1/2)+1)/(1+(-s^2+1)^(1/2)))*exp(4*t)*s^2+2*(-s^2+1)^(1/2)*exp(4*t)*s^2-arctanh((exp(2*t)*s-exp(2*t)-s+1)/((exp(2*t)+1)*(-s^2+1)^(1/2)))*exp(8*t)*s^2+exp(8*t)*arctanh((-1+s)/(-s^2+1)^(1/2))*s^2+2*exp(4*t)*arctanh((-1+s)/(-s^2+1)^(1/2))*s^2-6*(-s^2+1)^(1/2)*ln(exp(4*t)*s+2*exp(2*t)+s)*exp(4*t)+6*(-s^2+1)^(1/2)*ln(s)*exp(4*t)-2*dilog(-(exp(2*t)*s-(-s^2+1)^(1/2)+1)/(-1+(-s^2+1)^(1/2)))*exp(4*t)*s^2)/((-s^2+1)^(1/2)*exp(8*t)*s^2-2*arctanh((-s^2+1)^(1/2)/(1+s))*exp(8*t)*s^2+4*(-s^2+1)^(1/2)*exp(6*t)*s-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(6*t)*s+2*(-s^2+1)^(1/2)*exp(4*t)*s^2-4*arctanh((-s^2+1)^(1/2)/(1+s))*exp(4*t)*s^2+4*(-s^2+1)^(1/2)*exp(4*t)-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(4*t)+4*(-s^2+1)^(1/2)*exp(2*t)*s-8*arctanh((-s^2+1)^(1/2)/(1+s))*exp(2*t)*s+(-s^2+1)^(1/2)*s^2-2*arctanh((-s^2+1)^(1/2)/(1+s))*s^2)

1 2 3 4 Page 1 of 4