## 135 Reputation

13 years, 264 days

## restart:assume(t,real):a:=1:alpha:=1.2:h...

restart:
assume(t,real):
a:=1:alpha:=1.2:h:=0.1:b:=GAMMA(2-alpha)/((1-alpha)*GAMMA(1-alpha)):
for n from 0 to 10 do
x[n]:=n*h:
vo[n]:=a*(x[n]-b*(ln((x[n]+b)/b))):
uo[n]:=a*(t-b*(ln((t+b)/b))):
u1[n]:=evalf(Int((x[n]-t)^(-alpha)*uo[n],t=0..x[n])):
S[n]:=vo[n]+u1[n]:
od:

data:=[seq([x[n],S[n]],n=0..10)]:
plot(data,axes=boxed);

## I got this...

Thanks

/x                   /
|                     |
|          (-alpha)   |
J :=  |   (x - t)         a |t
/                      \
0

/    t (1 - alpha) GAMMA(1 - alpha)\\
GAMMA(2 - alpha) ln|1 + ------------------------------||
\           GAMMA(2 - alpha)       /|
- -------------------------------------------------------| dt
(1 - alpha) GAMMA(1 - alpha)              /
1             /  / (-alpha)        /
------------------------ |a |x         MeijerG|
(-1 + alpha) (alpha - 2) \  \                 \

1\                    3
[[-1], [1 - alpha]], [[-1, -1], []], -| GAMMA(-alpha) alpha  - 3
x/

(-alpha)        /                                     1\
x         MeijerG|[[-1], [1 - alpha]], [[-1, -1], []], -| GAMMA(-alpha
\                                     x/

2      (-alpha)                            /
) alpha  + 2 x         GAMMA(-alpha) alpha MeijerG|
\

1\    (2 - alpha)\\
[[-1], [1 - alpha]], [[-1, -1], []], -| + x           ||
x/               //

## @Rouben Rostamian   Thanks you are...

Thanks you are right.

How if we change r to abs(r)

## @Carl Love  Thanks Carl for all yo...

The expressions are very complicated to solve the integration symbolically.

So I tried the basic way to solve it approximately (by summation).

thamks agian @Carl Love  and @acer

## @acer  the code is doing integrati...

the code is doing integration whic is the summation by simpson rule

## @acer  Thanks ace last polint in ...

Thanks ace

last polint in this line

sum1[n]:=2*(L[n]+sum1[n-1])/3;

how can i separte the summation of the even position and the odd as sum1[2n]=2*(L1[2n]+sum1[2n-1]) and for the odd be sum1[2n+1]=L1[2n+1]+sum1

## @tomleslie  thanks, how can i cal...

thanks,

how can i calculate the last line which is the summation of L1[n] from -10 to 10

## @Carl Love @tomleslie Thanks for a...

I guess this code need a litle improvement and will work

plsease check thisnew_code.mw

numerical_int.mw

## @Carl Love  r must be real that i...

r must be real

that is the main reason i write it down  in if statement

## @Carl Love  no r has two caes as:...

no r has two caes

as:

if N*(N+1)>(delta+Delta-w)^2 then
r:=sqrt(N*(N+1)-(delta+Delta-w)^2):
elif
N*(N+1)<(delta+Delta-w)^2 then
r:=sqrt(-(N*(N+1)+(delta+Delta-w)^2)):
end if:

and d is from -5 to 5

so if we could make a seq. of points (d, int(L1)) then it would be easy to me to plot Re( int(L1)) agianst d

## r has two cases...

if N*(N+1)>(delta+Delta-w)^2 then
r:=sqrt(N*(N+1)-(delta+Delta-w)^2):
elif
N*(N+1)<(delta+Delta-w)^2 then
r:=sqrt(-(N*(N+1)-(delta+Delta-w)^2)):
end if:

## @Carl Love  L1:=(-2*Cp*z+Cz*x)*f;&...

L1:=(-2*Cp*z+Cz*x)*f;

where f depends on w and Cp, Cz depend on (d,w)

## @Carl Love I totally agree with you...

I totally agree with you.

my concern is: 1) regarding expression (r) I cant dermine whether is it false or true (that the main reson I do it in loop). since (r) has two cases

2) the expression L1 is dependent on both w and d  (if i remove the do loop).

3) finally i would like to plot Re(gd) agianst (d)

check the code pleaseI do appreciate ur help

numerical_int.mw

## @Carl Love  Thanks Carl the expre...

Thanks Carl

the expressions are too lengthy and depends on w, d that why I did do loop

here some changes in the codenumerical_int.mw

 1 2 3 4 5 6 7 Last Page 2 of 12
﻿