isifesai

30 Reputation

3 Badges

7 years, 33 days

MaplePrimes Activity


These are replies submitted by isifesai

@dharr Having tried effortlessly in solving the problem, I started doing it partly manual and partly using Maple and  since I am not all that good with the software, I could not finish it. Please could you help me look at what I did with a view to detecting why it could not be solved. Attached is the work

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/chinasa_2.mw .
 

Download chinasa_2.mw
 

eq1 := 49+a[1]-b[3]-c[1] = 0;

49+a[1]-b[3]-c[1] = 0

(1)

eq2 := 94+a[1]-b[4]-c[2] = 0;

94+a[1]-b[4]-c[2] = 0

(2)

eq3 := 90+a[1]-b[5]-c[3] = 0;

90+a[1]-b[5]-c[3] = 0

(3)

eq4 := 24+a[1]-b[6]-c[4] = 0;

24+a[1]-b[6]-c[4] = 0

(4)

eq5 := 6+a[1]-b[7]-c[5] = 0;

6+a[1]-b[7]-c[5] = 0

(5)

eq6 := 63+a[1]-b[8]-c[6] = 0;

63+a[1]-b[8]-c[6] = 0

(6)

eq7 := 17+a[1]-b[9]-c[7] = 0;

17+a[1]-b[9]-c[7] = 0

(7)

eq8 := 65+a[1]-b[10]-c[8] = 0;

65+a[1]-b[10]-c[8] = 0

(8)

eq9 := 72+a[1]-b[11]-c[9] = 0;

72+a[1]-b[11]-c[9] = 0

(9)

eq10 := 40+a[1]-b[12]-c[10] = 0;

40+a[1]-b[12]-c[10] = 0

(10)

eq11 := 67+a[1]-b[13]-c[11] = 0;

67+a[1]-b[13]-c[11] = 0

(11)

eq12 := 99+a[1]-b[14]-c[12] = 0;

99+a[1]-b[14]-c[12] = 0

(12)

eq13 := 97+a[2]-b[15] = 0;

97+a[2]-b[15] = 0

(13)

eq14 := 53+a[2]-b[16] = 0;

53+a[2]-b[16] = 0

(14)

eq15 := 22+a[2]-b[17] = 0;

22+a[2]-b[17] = 0

(15)

eq16 := 47+a[2]-b[18] = 0;

47+a[2]-b[18] = 0

(16)

eq17 := 60+a[2]-b[19] = 0;

60+a[2]-b[19] = 0

(17)

eq18 := 36+a[2]-b[20] = 0;

36+a[2]-b[20] = 0

(18)

eq19 := 54+a[2]-b[21] = 0;

54+a[2]-b[21] = 0

(19)

eq20 := 67+a[2]-b[22] = 0;

67+a[2]-b[22] = 0

(20)

eq21 := 46+a[2]-b[23] = 0;

46+a[2]-b[23] = 0

(21)

eq22 := 55+a[2]-b[24] = 0;

55+a[2]-b[24] = 0

(22)

eq23 := 42+a[2]-b[25] = 0;

42+a[2]-b[25] = 0

(23)

eq24 := 70+a[2]-b[26] = 0;

70+a[2]-b[26] = 0

(24)

eq25 := a[1]*(x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]+x[8]+x[9]+x[10]+x[11]+x[12]) = 0;

a[1]*(x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]+x[8]+x[9]+x[10]+x[11]+x[12]) = 0

(25)

eq26 := a[2]*(x[13]+x[14]+x[15]+x[16]+x[17]+x[18]+x[19]+x[20]+x[21]+x[22]+x[23]+x[24]) = 0;

a[2]*(x[13]+x[14]+x[15]+x[16]+x[17]+x[18]+x[19]+x[20]+x[21]+x[22]+x[23]+x[24]) = 0

(26)

eq27 := -a[3]*x[1] = 0;

-a[3]*x[1] = 0

(27)

eq28 := -a[4]*x[2] = 0;

-a[4]*x[2] = 0

(28)

eq29 := -a[5]*x[3] = 0;

-a[5]*x[3] = 0

(29)

eq30 := -a[6]*x[4] = 0;

-a[6]*x[4] = 0

(30)

eq31 := -a[7]*x[5] = 0;

-a[7]*x[5] = 0

(31)

eq32 := -a[8]*x[6] = 0;

-a[8]*x[6] = 0

(32)

eq33 := -a[9]*x[7] = 0;

-a[9]*x[7] = 0

(33)

eq34 := -a[10]*x[8] = 0;

-a[10]*x[8] = 0

(34)

eq35 := -a[11]*x[9] = 0;

-a[11]*x[9] = 0

(35)

eq36 := -a[12]*x[10] = 0;

-a[12]*x[10] = 0

(36)

eq37 := -a[13]*x[11] = 0;

-a[13]*x[11] = 0

(37)

eq38 := -a[14]*x[12] = 0;

-a[14]*x[12] = 0

(38)

eq39 := -a[15]*x[13] = 0;

-a[15]*x[13] = 0

(39)

eq40 := -a[16]*x[14] = 0;

-a[16]*x[14] = 0

(40)

eq41 := -a[17]*x[15] = 0;

-a[17]*x[15] = 0

(41)

eq42 := -a[18]*x[16] = 0;

-a[18]*x[16] = 0

(42)

eq43 := -a[19]*x[17] = 0;

-a[19]*x[17] = 0

(43)

eq44 := -a[20]*x[18] = 0;

-a[20]*x[18] = 0

(44)

eq45 := -a[21]*x[19] = 0;

-a[21]*x[19] = 0

(45)

eq46 := -a[22]*x[20] = 0;

-a[22]*x[20] = 0

(46)

eq47 := -a[23]*x[21] = 0;

-a[23]*x[21] = 0

(47)

eq48 := -a[24]*x[22] = 0;

-a[24]*x[22] = 0

(48)

eq49 := -a[25]*x[23] = 0;

-a[25]*x[23] = 0

(49)

eq50 := -a[26]*x[24] = 0;

-a[26]*x[24] = 0

(50)

eq51 := x[1]-54 = 0;

x[1]-54 = 0

(51)

eq52 := x[2]-30 = 0;

x[2]-30 = 0

(52)

eq53 := x[3]-13 = 0;

x[3]-13 = 0

(53)

eq54 := x[4]-14 = 0;

x[4]-14 = 0

(54)

eq55 := x[5]-97 = 0;

x[5]-97 = 0

(55)

eq56 := x[6]-11 = 0;

x[6]-11 = 0

(56)

eq57 := x[7]-62 = 0;

x[7]-62 = 0

(57)

eq58 := x[8]-59 = 0;

x[8]-59 = 0

(58)

eq59 := x[9]-35 = 0;

x[9]-35 = 0

(59)

eq60 := x[10]-42 = 0;

x[10]-42 = 0

(60)

eq61 := x[11]-19 = 0;

x[11]-19 = 0

(61)

eq62 := x[12]-12 = 0;

x[12]-12 = 0

(62)

solve({eq*[i], i = 1 .. 62}*a[i] >= 0, i = 1 .. 26, b[i] >= 0, i = 1 .. 12, x[i] >= 0, i = 1 .. 24*[x[i], i = 1 .. 24])

Error, (in simpl/reloprod) invalid terms in product: 1 .. 24

 

``


 

Download chinasa_2.mw
 

@dharr Thanks for your valuable imputs. I have unassigned the 'i' values, and effected some of your suggestions but all to no avail. i am still working on it. Thank you once more

in a bid to solve the problem, I made some improvements, but could not get values of the variables. At
 

restart

with(linalg)

f := 49*x[1]+94*x[2]+90*x[3]+24*x[4]+6*x[5]+63*x[6]+17*x[7]+65*x[8]+72*x[9]+40*x[10]+67*x[11]+99*x[12]+97*x[13]+53*x[14]+22*x[15]+47*x[16]+60*x[17]+36*x[18]+54*x[19]+67*x[20]+46*x[21]+55*x[22]+42*x[23]+70*x[24];

49*x[1]+94*x[2]+90*x[3]+24*x[4]+6*x[5]+63*x[6]+17*x[7]+65*x[8]+72*x[9]+40*x[10]+67*x[11]+99*x[12]+97*x[13]+53*x[14]+22*x[15]+47*x[16]+60*x[17]+36*x[18]+54*x[19]+67*x[20]+46*x[21]+55*x[22]+42*x[23]+70*x[24]

(1)

g[1] := x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]+x[8]+x[9]+x[10]+x[11]+x[12]-475;

x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]+x[8]+x[9]+x[10]+x[11]+x[12]-475

(2)

g[2] := x[13]+x[14]+x[15]+x[16]+x[17]+x[18]+x[19]+x[20]+x[21]+x[22]+x[23]+x[24]-30;

x[13]+x[14]+x[15]+x[16]+x[17]+x[18]+x[19]+x[20]+x[21]+x[22]+x[23]+x[24]-30

(3)

for i from 3 to 26 do g[i] := -x[i] end do:

h[1] := 54-x[1];

54-x[1]

(4)

h[2] := 30-x[2]

13-x[2]

(5)

h[3] := 13-x[3];

13-x[3]

(6)

h[4] := 41-x[4];

41-x[4]

(7)

h[5] := 97-x[5];

97-x[5]

(8)

h[6] := 11-x[6];

11-x[6]

(9)

h[7] := 62-x[7];

62-x[7]

(10)

h[8] := 59-x[8];

59-x[8]

(11)

h[9] := 35-x[9];

35-x[9]

(12)

h[10] := 42-x[10];

42-x[10]

(13)

h[11] := 19-x[11];

19-x[11]

(14)

h[12] := 12-x[12];

12-x[12]

(15)

vars := [x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[22], x[23], x[24]];

[x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[22], x[23], x[24]]

(16)

H := Hessian(f, vars);

Hessian(49*x[1]+94*x[2]+90*x[3]+24*x[4]+6*x[5]+63*x[6]+17*x[7]+65*x[8]+72*x[9]+40*x[10]+67*x[11]+99*x[12]+97*x[13]+53*x[14]+22*x[15]+47*x[16]+60*x[17]+36*x[18]+54*x[19]+67*x[20]+46*x[21]+55*x[22]+42*x[23]+70*x[24], [x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[22], x[23], x[24]])

(17)

grad_f := Del(f, vars);

Del(49*x[1]+94*x[2]+90*x[3]+24*x[4]+6*x[5]+63*x[6]+17*x[7]+65*x[8]+72*x[9]+40*x[10]+67*x[11]+99*x[12]+97*x[13]+53*x[14]+22*x[15]+47*x[16]+60*x[17]+36*x[18]+54*x[19]+67*x[20]+46*x[21]+55*x[22]+42*x[23]+70*x[24], [x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[22], x[23], x[24]])

(18)

for i to 26 do grad_g[i] := Del(g[i], vars) end do

for i to 12 do grad_h[i] := Del(h[i], vars) end do:

eq[1] := grad_f+sum(mu[i]*g[i], i = 13 .. 26)+sum(lambda[i]*h[j], j = 1 .. 12) = 0

Error, (in sum) summation variable previously assigned, second argument evaluates to 13 = 13 .. 37

 

eq[2] := g[i] <= 0;

-x[13] <= 0

(19)

eq[3] := h[j] <= 0;

h[j] <= 0

(20)

eq[4] := mu[i] >= 0;

0 <= mu[13]

(21)

eq[5] := lambda[j] <= 0;

lambda[j] <= 0

(22)

eq[6] := mu[i]*g[i] = 0;

-mu[13]*x[13] = 0

(23)

eval(solve({eq[1], eq[2], eq[3], eq[4], eq[5], eq[6]}, [vars, lambda[j], mu[i]]))

Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is [[x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[22], x[23], x[24]], lambda[j], mu[13]]

 

``


 

Download chinasa1.mw

I do share your sentinments dear. When I joined the group, there was this challenge I wanted the group to asist me in solving, but up till now that has not been done. I felt disappointed, but with the group I kept leraning new ideas ebveryday, hoping that one day my challenge will be over. Cheer up!

@Carl Love Thank you very much for your wonderful correction. I have worked on my code by taking cognizance of your useful suggestion, howerver my challengres still persists as some functions are being returned unevaluated. Some of the functions are psi , chi and Lambda. Please do take your time to compare the algorithm and the attached file with a view of helping me evealuate those functions. Thank you once more for your sacrifice. repro1.mwrepro1.mwrepro1.mw 

Dear all, having waited for assistance towards writing a program that solves the algorithm above, I decided to make some attempts. My challenge is to write a maple program that will solve the volterra inegral equation u(x) - int(xyu^3(y).y=0..1) = exp(x) - x(1+2exp(3))/9 using the method of reproducing kernel space. Please someone should help me compare the algorithm and the attempt I made with a view to finding out the errors. Thanks.


 

restart; with(student)

x := .1;

.1

(1)

for i to 10 do x[i] = (i-1)/(n-1) end do:

for i to 10 do R(x[i], x) := proc (x) options operator, arrow; piecewise(x[i] <= x, 1+x, x < x[i], 1+x[i]) end proc end do:

for i to 10 do psi[i](x) := exp(x[i])-(1/9)*(1+2*exp(3))*x[i]+int(x[i]*y*R(x[i], y)^3, y = 0 .. 1) end do:

u[0](x[1]) := u(x[1]) = 1;

u(.1[1]) = 1

(2)

for i to 10 do chi[ij] := [1/psi][ij] end do:

n := 1;

1

(3)

Lambda[n] := sum(chi[nk]*u[k-1](x[k]), k = 1 .. n);

chi[nk]*u(.1[1]) = chi[nk]

(4)

u[n](x) := sum(Lambda[r]*psi[r], r = 1 .. n);

psi[1]*chi[nk]*u(.1[1]) = psi[1]*chi[nk]

(5)

if n < 10 then n := n+1 else close end if;

2

(6)

``


 

Download repro.mw
 

restart; with(student)

x := .1;

.1

(1)

for i to 10 do x[i] = (i-1)/(n-1) end do:

for i to 10 do R(x[i], x) := proc (x) options operator, arrow; piecewise(x[i] <= x, 1+x, x < x[i], 1+x[i]) end proc end do:

for i to 10 do psi[i](x) := exp(x[i])-(1/9)*(1+2*exp(3))*x[i]+int(x[i]*y*R(x[i], y)^3, y = 0 .. 1) end do:

u[0](x[1]) := u(x[1]) = 1;

u(.1[1]) = 1

(2)

for i to 10 do chi[ij] := [1/psi][ij] end do:

n := 1;

1

(3)

Lambda[n] := sum(chi[nk]*u[k-1](x[k]), k = 1 .. n);

chi[nk]*u(.1[1]) = chi[nk]

(4)

u[n](x) := sum(Lambda[r]*psi[r], r = 1 .. n);

psi[1]*chi[nk]*u(.1[1]) = psi[1]*chi[nk]

(5)

if n < 10 then n := n+1 else close end if;

2

(6)

``


 

Download repro.mw

 

@tomleslie Thank you very much

@tomleslie  Thanks a million, the errors you pointed out are mine. I have corrected it but was unable to plot the graph. Please help me go through the attached file to find the problem . Thanks once more.
 

restart; with(student)

n := 2;

2

(1)

v := sum(u[i]*p^i, i = 0 .. 2);

p^2*u[2]+p*u[1]+u[0]

(2)

f := proc (x) options operator, arrow; exp(x)+(1/2)*x*(exp(2*x)-1) end proc;

proc (x) options operator, arrow; exp(x)+(1/2)*x*(exp(2*x)-1) end proc

(3)

k := proc (x, t) options operator, arrow; x end proc;

proc (x, t) options operator, arrow; x end proc

(4)

F := proc (u) options operator, arrow; u^2 end proc;

proc (u) options operator, arrow; u^2 end proc

(5)

u[0] := f(t);

exp(t)+(1/2)*t*(exp(2*t)-1)

(6)

for i to 2 do u[i] := expand(subs(x = t, int(coeff(p*k(x, t)*F(v), p^i), t = 0 .. x))) end do:

s := value(sum(u[k], k = 0 .. 2));

(396536351/311040000)*t-(1/72)*t^7+(2809/72000)*(exp(t))^5*t^2+(1/48)*(exp(t))^2*t^5-(2809/360000)*(exp(t))^5*t+(31/27)*(exp(t))^3*t^3-(1/6)*(exp(t))^2*t^4+(1/96)*(exp(t))^6*t^5+(11/120)*(exp(t))^5*t^4-(5/64)*(exp(t))^4*t^5+(1/24)*(exp(t))^2*t^6-(11/18)*(exp(t))^3*t^4-(7/576)*(exp(t))^6*t^4+(17/2304)*(exp(t))^6*t^3+(1/6)*exp(t)*t^5+(1/3)*exp(t)*t^4-2*exp(t)*t^3-(17/6912)*(exp(t))^6*t^2-(323/3600)*(exp(t))^5*t^3+(19/128)*(exp(t))^4*t^4+(17/41472)*(exp(t))^6*t+(1753/3456)*t^4+(263/576)*exp(t)*t^2-(263/576)*exp(t)*t+(161/768)*(exp(t))^4*t^3-(739/4608)*(exp(t))^4*t^2+(739/18432)*(exp(t))^4*t-(59/324)*(exp(t))^3*t^2-(4201/2304)*(exp(t))^2*t^3+(59/972)*(exp(t))^3*t+(6505/2304)*(exp(t))^2*t^2-(4201/4608)*(exp(t))^2*t+exp(t)+(1/2)*t*(exp(2*t)-1)

(7)

U := proc (x) options operator, arrow; collect(s, x) end proc;

proc (x) options operator, arrow; collect(s, x) end proc

(8)

with*plots:

p1 := plot*(exact*solution, t = 0 .. 5, style = point):

p2 := plot*(U(t), t = 0 .. T and 0 .. T = 5, style = line):

plots*([display])(p1, p2);

plots*[display(plot*(exact*solution, t = 0 .. 5, style = point), plot*(-(1/72)*t^7+(1/24)*(exp(t))^2*t^6+((1/48)*(exp(t))^2+(1/96)*(exp(t))^6-(5/64)*(exp(t))^4+(1/6)*exp(t))*t^5+(-(1/6)*(exp(t))^2+(11/120)*(exp(t))^5-(11/18)*(exp(t))^3-(7/576)*(exp(t))^6+(1/3)*exp(t)+(19/128)*(exp(t))^4+1753/3456)*t^4+((31/27)*(exp(t))^3+(17/2304)*(exp(t))^6-2*exp(t)-(323/3600)*(exp(t))^5+(161/768)*(exp(t))^4-(4201/2304)*(exp(t))^2)*t^3+((2809/72000)*(exp(t))^5-(17/6912)*(exp(t))^6+(263/576)*exp(t)-(739/4608)*(exp(t))^4-(59/324)*(exp(t))^3+(6505/2304)*(exp(t))^2)*t^2+(241016351/311040000-(2809/360000)*(exp(t))^5+(17/41472)*(exp(t))^6-(263/576)*exp(t)+(739/18432)*(exp(t))^4+(59/972)*(exp(t))^3-(4201/4608)*(exp(t))^2+(1/2)*exp(2*t))*t+exp(t), false, style = line))]

(9)

``


 

Download prime_question.mw

@Mariusz Iwaniuk Though the first method is slow, I prefer it as it gives an approximate solution of the given. As you pointed out on plishing the code for the second one, I could not plot its graph as I got the following error code: Error, (in ifunc) `Interpolation` does not evaluate to a module. Thanks a bunch.

@Mariusz Iwaniuk Thanks a million. That is awesome!

@Mariusz Iwaniuk Thanks for all your efforts. Please I want to know if one can be able to solve the following equation symbolically like the previous one. I tried but got error message.

eq := x(t) = a*(k*t+1)+b*t-k*(int((t-s)*x(s), s = 0 .. t))+2*(int((t-s)^(1/2)*x(s)^3, s = 0 .. t))/sqrt(Pi)Thanks.

@Mariusz Iwaniuk Thanks very much. My challenge on that could be that I do not have MMA.

@Carl Love Thanks a bunch. I am not ungreatful as your answer is of good help to me. Thanks one more for your ingenuity. 

@Mariusz Iwaniuk Thanks for your time, no doubt your solution gave me some insghts. I think intsolve deals with linear integral equation not the nonlinear ones. I tried it before. Why I reverted to changing the integral DE to ODE is my inability to solve the problem via the the method of reproducing kernel space (a numerical way of solving it). My supervisor insists I obtain a numerical solution. Thanks one more

Page 1 of 1