Items tagged with integration integration Tagged Items Feed

This might seem easy but i am a total beginner in Maple and i really need to know how to do this. If i have an expression like this:

X^2 + 3*y + 3*z + X^7

where (y) and (z) are constants of unknown values. I need to integrate the expression over an interval for example (from 1 to 10) so that the answer would still be in terms of (y) and (z).

Would anyone please help me and give me the right expression for writing this on Maple?

Thanks in advance.


 \int_{a}^{b} f(x) \, dx \approx \tfrac{3h}{8}\left[f(x_0) + 3f(x_1) + 3f(x_2) 
+ 2f(x_3) + 3f(x_4) + 3f(x_5) + 2f(x_6) + ... + f(x_n)\right] .


A Fantastic Good morning Ladies and Gentelmen,

You have the mission to find the problem in that code/ give a better code?
I want to write a procedure for the simpson 3/8 rule using the above formula I took from wikipedia :
(I don't want to use any super maple command that estimate the simpson 3/8, but just using this formula and starting from scratch, I am a beginner so feel free to laugh at my code hehehe)
here is the code I managed to write after 365 hours :D

restart:
simp38:=proc(f,x0,xn,n)                 
     local h,summ,i,x,Integral:                                              
     h=evalf((xn-x0)/n);               #h is the distance between 2 points
     summ:=f(x0)+f(xn);              #initialise the summ
    
      for i from 1 to n-1 by 3 do             
          x[i]:=x0+i*h:
          summ:=evalf(summ+3*f(x[i])):
      od:
      for i from 2 to n-1 by 3 do              
          x[i]:=x0+i*h:
          summ:=evalf(summ+3*f(x[i])):
      od:
      for i from 3 to n-1 by 3 do                  
          x[i]:=x0+i*h:
          summ:=evalf(summ+2*f(x[i])):  
      od:
    
      Integral:=3*h/8*summ;                  
 end:

simp38(x->(x^5-5.15*x^2+8.55*x-4.05045),1,5,6);   #testing it      --->2481.087090
evalf(int(x^5-5.15*x^2+8.55*x-4.05045,x=1..5));      #comparing it --->2477.531533


Your help will be apreciated.


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: {}

Greetings, seeking an expert to animate a plot.

see worksheet.posterior_graphs_(encapsulted)_1D.mw

before they play each other, each have a law (a normal distribution) plot-output 6.

after DD defeats CC, and a numerical integration is performed the new laws are given by plot-output 18.

as you can see, the laws of DD and CC are closer together.

if the calc was repeated (DD defeats CC again), the laws would be closer again.

so what i require is an animation of the new laws from game 1 to (say) game 6 (DD defeats CC every time). seeing the red and blue distributions merging would be ideal.

as an aside I heard maples FFT could simplify the complicated integration. any suggestions?

cheers

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

 

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 :)

Hello everybody!

My name is Mathew and I am a new member of this forum, and this is my first post, so please be lenient towards me:) I wanted to ask for help since my adventure with Maple 18 was supposed to start yesterday, unfortunately I encountered a problem I couldn't solve myself so far- my Maple 18 does not integrate. At all. It has no problem with differentiating, adding, subtracting and such, unfortunately any type of integral is unsolvable by Maple. I tried typing the easiest functions, such as e2xdx under the integral, unfortunately it is met with following message:

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

I understood from several tutorials on the internet that this program should not have any problems with dealing with such form of formulas. What could be wrong? How to make  it work as it is supposed to?

Please help me. As I mentioned in the beginning, I am a new member, so in case I did something wrong or placed this post in wrong category- please forgive me;)

I am currently running into an issue where the numerical solution to an equation (involving an integral, yes, but the value I am solving for is simly a constant in the integral) is taking significantly longer than I would hope it would to solve. I am solving a similar equation (with a simpler expression) and it is significantly easier to solve, and I am hoping for that kind of speed.

On the last two lines in the attachment, I have two expressions. The penultimate expression is the baseline speed that I would like to match. The last expression is the fsolve I would like to speed up.

Is there any way to numerically speed up the process? I found that when I did tracelast after halting the process, there were HUGE numbers being added and subtracted, multiplied and divided. Not only did this significantly slow down the proecss but it also adds much numerical instability, which I would also like to avoid.

All help would be appreciated.

pole-dragging-mapleprimes.mw

Hi, all

I use INT to calculate multiple integration as below. It runs more than 20 hours without results. I wander is there any problem in my codes.

restart;
A := sin(k*Pi*(x-h*cos(theta))/a)*sin(l*Pi*(y-h*sin(theta))/b)*sin(k[0]*h)*sin(k*Pi*x/a)*sin(l*Pi*y/b);

W := evalf[5](int(int(int(int(A, h = 0 .. (x-a)/cos(theta)), theta = Pi+arctan((b-y)/(a-x)) .. 3*Pi*(1/2)), x = 0 .. a), y = 0 .. b, numeric))

 

Thanks

according to help on Combine

The Combine command combines integrals using linearity. The parameter v is any expression involving definite or indefinite integrals.

So, why I get an error from the following?

restart;
expr:=Int(sin(x),x) + Int(cos(x),x);

IntegrationTools:-Combine(expr);

Error, (in IntegrationTools:-Combine) invalid subscript selector

interface(version);
 Standard Worksheet Interface, Maple 18.02, Windows 7, October  20 2014

 

 

 

 

 

Hello everyone,

I'm using Maple18, I tried to integrate the function including natural logarithm:

 

But we get the answer:

Is there any simple way to directly convert the answer to the kind of form we want? I cannot not finish the conversion:

 

So the toolbox "IntegrationTools" was used, but finally, we couldn't compute the integral:

 

 However, we can get the correct answer by manually inputting the formula.

 

Using IntegrationTools is pretty nasty and not very convenient, such as the problem I mentioned.

Does anyone have another solution?

The problem is The square root of 16-x^2 over the interval [0,-4]  0 being the upper bound, -4 being the lower bound.  I have solved 3/4s of this problem but I don't understand what they mean by "Solve the definite integral exactly by geometry". 

test.mw

restart; with(LinearAlgebra)

``

dF := -.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t);

-.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t)

(1)

``

e3 := `<,>`(1, 1, 1); E := proc (m) options operator, arrow; IdentityMatrix(m) end proc; beta := `<|>`(.1, .6, .3); S := `<|>`(`<,>`(-3, 1, 1), `<,>`(1, -5, 2), `<,>`(0, 2, -4)); S0 := -S.e3

beta := Vector[row](3, {(1) = .1, (2) = .6, (3) = .3})

 

S := Matrix(3, 3, {(1, 1) = -3, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = -5, (2, 3) = 2, (3, 1) = 1, (3, 2) = 2, (3, 3) = -4})

 

S0 := Vector(3, {(1) = 2, (2) = 2, (3) = 1})

(2)

Z := `<|>`(x, y, z)

Z := Vector[row](3, {(1) = x, (2) = y, (3) = z})

(3)

ME := MatrixExponential(S+Typesetting:-delayDotProduct(S0, Z), t);

`[Length of output exceeds limit of 1000000]`

(4)

MEint := map(int, ME.dF, t = 0 .. infinity)

Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to definite integration.

 

`&beta;plus&Assign;solve`(Z = beta.MEint, Z)

"(RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row])=RTABLE(18446744074193876574,VECTOR([.1, .6, .3]),Vector[row]).MEint) betaplus:=solve (RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row]))"

(5)

``

1step- I want to integrate the (ME*dF) from t=0 to ∞ .

2step- Evaluate Z=<x,y,z> by solving Z=β*MEint.

Download test.mw

I have updated  Maple from 18.01 to 18.02, but there is something strange happened to me. I can not use int anymore. Here is my codes:

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

kernelopts(version);
print(`output redirected...`); # input placeholder
    Maple 18.00, X86 64 LINUX, Feb 10 2014, Build ID 922027

 

Here is the screenshot:

A customer on Twitter recently asked why Maple gives the following result:

 

 


The issue here is that the t in f(t) is the same as the integration variable. 140 characters is not a lot to work with for a reply, so here is a longer explanation.

 

First, note that the process of integration treats the integration variable differently than the other variables, so that replacing another variable by the integration variable has a different effect depending on whether the replacement is done before or after the integration is performed. Consider this simple example:

 

a := int(t, t)

(1/2)*t^2

(4)

eval(a, t = x)

(1/2)*x^2

(5)

a := int(x, t)

x*t

(6)

   

eval(a, t = x)

x^2

(7)

 

In other words, integration does not commute with substitution. This is a fundamental property of integration and in fact, Maple's eval has special rules to take this into account when you ask it to replace the integration variable.  For example, if you evaluate the inert form of the integral at x = y, the substitution is performed explicitly:

 

 

eval(Int(x-t, t = 0 .. x), x = y)

Int(y-t, t = 0 .. y)

(8)

value(Int(y-t, t = 0 .. y))

(1/2)*y^2

(9)

 

However, if you try to evaluate at x = t, the evaluation is delayed until after the integral is evaluated:

 

eval(Int(x-t, t = 0 .. x), x = t)

eval(Int(x-t, t = 0 .. x), {x = t})

(10)

 

value(eval(Int(x-t, t = 0 .. x), {x = t}))

(1/2)*t^2

(11)

 

The eval command knows it shouldn't substitute into an integral when the substitution involves the variable of integration.

 

However, in the user's example, asking Maple for f(t) is equivalent to substitution directly before the integration is performed, like this:

 

subs(x = t, Int(x-t, t = 0 .. x))

Int(0, t = 0 .. t)

(12)

which of course gives:

 

value(%)

0

(13)

 

Another way to have the two t variables be considered distinct is to explicitly make the integration variable a dummy by declaring it local:

 

f := proc (x) local t; int(x-t, t = 0 .. x) end proc
 

Now the ts are treated differently:

 

f(t)

(1/2)*t^2

(14)

``

Austin Roche

Senior Math Developer

Maplesoft

 

Download integration_variables.mw

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