Question: how to compute coefficient of an integral equation

Dear all, I am having difficuty in executing the following program. the error message reads "Error, unable to compute coeff". Secondly the solution and the graph of the equation could not display.Attached is the prime_question.mw
 

 

Download prime_question.mw
 

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; e^x+(1/2)*x*(e^(2*x)-1) end proc;

proc (x) options operator, arrow; e^x+(1/2)*x*(e^(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(x)^2 end proc;

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

(5)

u[0] := f(t);

e^t+(1/2)*t*(e^(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

Error, unable to compute coeff

 

s := value(sum(Eu[k], k = 0 .. 2*e));

sum(Eu[k], k = 0 .. 2*e)

(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 .. T, style = point):

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

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

plots*[display(plot*(exact*solution, t = 0 .. T, style = point), plot*(sum(Eu[k], k = 0 .. 2*e), t = 0 .. T, style = line))]

(9)

``

``


 

Download prime_question.mw

 

 

file

Please Wait...