* B2
( corrected for solving integral equations with Hereditary kernels )
----------------------------------------------------------------------------------------------------
> | xapxi:=proc(f,lambda,a,b,n,K) |
> | local s,smax,smin,saiso,i,D,T,eq1,alpha,eq,alpha1,iv,dv; eq1:=u(x)=f+lambda*int(K*u(y), y=a..b);;printf("n%s"," ");print("*********************************************************************");print(" THE VOLTERRA INTEGRAL EQUATION II ( second kind ) :",eq1,"*********************************************************************");u[1](x):=f+alpha1*lambda*int(K, y=a..b);alpha:=int(u[1](x), x=a..b);eq:=alpha1=alpha;printf("n%s"," RECURRING TASKS NUMBER ");print("1&/.THE EQUATION OF 1st ADJUSTMENT QUANTITY : ", eq);alpha1:=Re(solve(eq,alpha1));print(" THE 1st ADJUSTMENT QUANTITY : alpha[1]=",evalf(alpha1,3));alpha[1]:=alpha1;u[1](x):=f+alpha[1]*lambda*int(K, y=a..b);print(" FUNCTION u[1](x)=",u[1](x));; |
> | T[0](x):=0: |
> | T[1](x):=x->u[1](x);D:=b-a-lambda*int(int(K, y=a..b), x=a..b); for i from 1 to n do u[0](x):=0:T[0](y):=0:T[1](x):=u[1](x);T[i](y):=subs(x=y,T[i](x));T[i-1](y):=subs(x=y,T[i-1](x));;printf("n%s"," ");print(" COMPARE WITH THE INITIAL FUNCTION",u[i-1],"(x)=",T[i-1](x));;printf("n%s"," ");print(" -------------------------------------------------------------------------------------------");printf("n%s"," RECURRING LOOP No ");printf("n%s"," "); ;print(i+1,"&/. ADJUSTMENT QUANTITY OF :",i+1," order WE OBTAIN : ");;alpha[i+1]:=(lambda/D)*int(int(K*(T[i](y)-T[i-1](y)-alpha[i]), y=a..b), x=a..b); alpha[i+1]:=evalf(alpha[i+1],5);;alpha[i+2]:=min(alpha[i+1],alpha[i]);;alpha[i+2]:= evalf(alpha[i+2],5); ;T[i+1](x):=f+lambda*int(K*(T[i](y)+alpha[i+1]), y=a..b);u[i+1](x):=T[i+1](x);;print(" FUNCTION ",u[i+1],"(x)=",T[i+1](x));print(" ALPHA COEFFICIENT",[i+1],"=" ,evalf(alpha[i+1],5));;;;saiso[i]:=sqrt((1/(b-a))*int((abs(u[i+1](x)-u[i](x))^2), x=a..b));;;;print(" ERROR OF : ",u[i+1],"(x)"," AND ",u[i],"(x)"," IS :");print( " ERROR ESTIMATED = ",evalf(saiso[i],5)); |
> | od:printf("n%s"," ");printf("n%s"," "); print("--------------------------------CONCLUSION-------------------------------- ");;printf("n%s"," ");print( "THE ESTIMATED ERRORS OF ");for i from 1 to n do print( " order ",[i]," IS :", evalf(saiso[i],5));od:;printf("n%s"," ");printf("n%s"," "); |
> | end: |
> | dothi:=proc(k,m,n,h) |
> | local y,ym,yn; |
> | with(plottools):with(plots):y:=u[k](x);ym:=u[m](x);yn:=u[n](x);print("GRAPHIC :", u[k],"(x) = ",u[k](x)," RED ");;print("GRAPHIC :", u[m],"(x) = ",u[m](x)," YELLOW ");;print("GRAPHIC :", u[n],"(x) = ",u[n](x)," BLUE "); :plot([y(x),ym,yn],x=-h..h,color=[red,yellow,blue],thickness=[3,9,15],title='APPROXIMATEDGRAPHICS'); |
> | end: |
> | xapxi(-20.2*sqrt(x), 3 , 0 , 1 , 10 , sqrt(x)*(y+10) ); |
> | dothi(2,1,8,15); |
> | 1+Int(x*y*u(y),y = 0 .. x); |
> | K:=1/18*x^7*y+1/18*x*y^7-1/9*x^4*y^4; |
> | xapxi( 1 , 1 , 0 , 1 , 15 , K ); |
> | dothi(2,8,13,50); |
B2.COHONGTRAN-AVGAPPOX