summaryrefslogtreecommitdiff
path: root/149/CH4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /149/CH4
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '149/CH4')
-rwxr-xr-x149/CH4/EX4.10/ques10.sce37
-rwxr-xr-x149/CH4/EX4.11/ques11.sce11
-rwxr-xr-x149/CH4/EX4.16/ques16.sce16
-rwxr-xr-x149/CH4/EX4.17/ques17.sce16
-rwxr-xr-x149/CH4/EX4.18/ques18.sce16
-rwxr-xr-x149/CH4/EX4.19/ques19.sce16
-rwxr-xr-x149/CH4/EX4.20/ques20.sce6
-rwxr-xr-x149/CH4/EX4.21/ques21.sce17
-rwxr-xr-x149/CH4/EX4.22/ques22.sce27
-rwxr-xr-x149/CH4/EX4.32/ques32.sce12
-rwxr-xr-x149/CH4/EX4.34/ques34.sce10
-rwxr-xr-x149/CH4/EX4.35/ques35.sce17
-rwxr-xr-x149/CH4/EX4.37/ques37.sce26
-rwxr-xr-x149/CH4/EX4.39/ques39.sce14
-rwxr-xr-x149/CH4/EX4.4.1/ques4_1.sce17
-rwxr-xr-x149/CH4/EX4.41/ques41.sce16
-rwxr-xr-x149/CH4/EX4.43/ques43.sce11
-rwxr-xr-x149/CH4/EX4.46/ques46.sce11
-rwxr-xr-x149/CH4/EX4.47/ques47.sce14
-rwxr-xr-x149/CH4/EX4.48/ques48.sce14
-rwxr-xr-x149/CH4/EX4.5/ques5.sce17
-rwxr-xr-x149/CH4/EX4.52/ques52.sce10
-rwxr-xr-x149/CH4/EX4.6/ques6.sce17
-rwxr-xr-x149/CH4/EX4.61/ques61.sce13
-rwxr-xr-x149/CH4/EX4.7/ques7.sce17
-rwxr-xr-x149/CH4/EX4.8/ques8.sce23
-rwxr-xr-x149/CH4/EX4.9/ques9.sce24
27 files changed, 445 insertions, 0 deletions
diff --git a/149/CH4/EX4.10/ques10.sce b/149/CH4/EX4.10/ques10.sce
new file mode 100755
index 000000000..604fbf59d
--- /dev/null
+++ b/149/CH4/EX4.10/ques10.sce
@@ -0,0 +1,37 @@
+clc
+disp(' y^(1/m)+y^-(1/m)=2x ');
+disp(' OR y^(2/m)-2xy^(1/m)+1');
+disp('OR y=[x+(x^2-1)]^m and y=[x-(x^2-1)]^m ');
+
+syms x m
+disp('For y=[x+(x^2-1)]^m ');
+ y=(x+(x^2-1))^m
+disp('we have to prove (x^2-1)y(n+2)+(2n+1)xy(n+1)+(n^2-m^2)yn ') ;
+//n=input('Enter the order of differentiation ");
+disp('calculating yn for various values of n');
+for n=1:4
+
+ //yn=diff(F,x,n)
+ F=(x^2-1)*diff(y,x,n+2)+(2*n+1)*x*diff(y,x,n+1)+(n^2-m^2)*diff(y,x,n);
+ disp(n);
+ disp('the expression for yn is ');
+ disp(F);
+ disp('Which is equal to 0 ');
+
+end
+disp('For y=[x-(x^2-1)]^m ');
+ y=(x-(x^2-1))^m
+disp('we have to prove (x^2-1)y(n+2)+(2n+1)xy(n+1)+(n^2-m^2)yn ') ;
+//n=input('Enter the order of differentiation ");
+disp('calculating yn for various values of n');
+for n=1:4
+
+ //yn=diff(F,x,n)
+ F=(x^2-1)*diff(y,x,n+2)+(2*n+1)*x*diff(y,x,n+1)+(n^2-m^2)*diff(y,x,n);
+ disp(n);
+ disp('the expression for yn is ');
+ disp(F);
+ disp('Which is equal to 0 ');
+
+end
+disp('Hence proved');
diff --git a/149/CH4/EX4.11/ques11.sce b/149/CH4/EX4.11/ques11.sce
new file mode 100755
index 000000000..31a496d87
--- /dev/null
+++ b/149/CH4/EX4.11/ques11.sce
@@ -0,0 +1,11 @@
+clc
+disp('for roles theorem F9x) should be differentiable in (a,b) and f(a)=f(b)');
+disp(' Here f(x)=sin(x)/e^x');
+disp('');
+syms x
+y=sin(x)/%e^x;
+
+y1=diff(y,x);
+disp(y1);
+disp('putting this to zero we get tan(x)=1 ie x=pi/4');
+disp('value pi/2 lies b/w 0 and pi. Hence roles theorem is verified');
diff --git a/149/CH4/EX4.16/ques16.sce b/149/CH4/EX4.16/ques16.sce
new file mode 100755
index 000000000..21ec43618
--- /dev/null
+++ b/149/CH4/EX4.16/ques16.sce
@@ -0,0 +1,16 @@
+//ques16
+disp('Maclaurins series');
+disp('f(x)=f(0)+xf1(0)+x^2/2!*f2(0)+x^3/3!*f3(0)+......');
+syms x a
+//function y=f(a)
+ y=tan(a);
+//endfunction
+n=input('enter the number of expression in series : ');
+a=1;
+t=eval(y);
+a=0;
+for i=2:n
+ y1=diff(y,'a',i-1);
+ t=t+x^(i-1)*eval(y1)/factorial(i-1);
+end
+disp(t)
diff --git a/149/CH4/EX4.17/ques17.sce b/149/CH4/EX4.17/ques17.sce
new file mode 100755
index 000000000..4ff07ee8d
--- /dev/null
+++ b/149/CH4/EX4.17/ques17.sce
@@ -0,0 +1,16 @@
+//ques16
+disp('Maclaurins series');
+disp('f(x)=f(0)+xf1(0)+x^2/2!*f2(0)+x^3/3!*f3(0)+......');
+syms x a
+
+ y=%e^(sin(a));
+ n=input('enter the number of expression in seris : ');
+ a=0;
+t=eval(y);
+a=0;
+for i=2:n
+ y1=diff(y,'a',i-1);
+ t=t+x^(i-1)*eval(y1)/factorial(i-1);
+end
+disp(t)
+
diff --git a/149/CH4/EX4.18/ques18.sce b/149/CH4/EX4.18/ques18.sce
new file mode 100755
index 000000000..2fac6438f
--- /dev/null
+++ b/149/CH4/EX4.18/ques18.sce
@@ -0,0 +1,16 @@
+//ques18
+disp('Maclaurins series');
+disp('f(x)=f(0)+xf1(0)+x^2/2!*f2(0)+x^3/3!*f3(0)+......');
+syms x a
+
+ y=log(1+(sin(a))^2);
+ n=input('enter the number of differentiation involved in maclaurins series : ');
+ a=0;
+t=eval(y);
+a=0;
+for i=2:n
+ y1=diff(y,'a',i-1);
+ t=t+x^(i-1)*eval(y1)/factorial(i-1);
+end
+disp(t)
+
diff --git a/149/CH4/EX4.19/ques19.sce b/149/CH4/EX4.19/ques19.sce
new file mode 100755
index 000000000..87b407982
--- /dev/null
+++ b/149/CH4/EX4.19/ques19.sce
@@ -0,0 +1,16 @@
+//ques19
+disp('Maclaurins series');
+disp('f(x)=f(0)+xf1(0)+x^2/2!*f2(0)+x^3/3!*f3(0)+......');
+syms x a b
+
+ y=%e^(a*asin(b));
+ n=input('enter the number of expression in seris : ');
+ b=0;
+t=eval(y);
+
+for i=2:n
+ y1=diff(y,'b',i-1);
+ t=t+x^(i-1)*eval(y1)/factorial(i-1);
+end
+disp(t)
+
diff --git a/149/CH4/EX4.20/ques20.sce b/149/CH4/EX4.20/ques20.sce
new file mode 100755
index 000000000..ef7798090
--- /dev/null
+++ b/149/CH4/EX4.20/ques20.sce
@@ -0,0 +1,6 @@
+//ques20
+disp('Advantage of scilab is that we can calculate log1.1 directly without using Taylor series');
+disp(' Use of taylor series are given in subsequent examples');
+y=log(1.1);
+disp('log(1.1)= ');
+disp(log(1.1)); \ No newline at end of file
diff --git a/149/CH4/EX4.21/ques21.sce b/149/CH4/EX4.21/ques21.sce
new file mode 100755
index 000000000..e26c9c70f
--- /dev/null
+++ b/149/CH4/EX4.21/ques21.sce
@@ -0,0 +1,17 @@
+//ques21
+disp('Taylor series');
+disp('f(x+h)=f(x)+hf1(x)+h^2/2!*f2(x)+h^3/3!*f3(x)+......');
+disp('To finf the taylor expansion of tan-1(x+h)')
+syms x h
+
+ y=atan(x);
+ n=input('enter the number of expression in seris : ');
+
+t=y;
+
+for i=2:n
+ y1=diff(y,'x',i-1);
+ t=t+h^(i-1)*(y1)/factorial(i-1);
+end
+disp(t)
+
diff --git a/149/CH4/EX4.22/ques22.sce b/149/CH4/EX4.22/ques22.sce
new file mode 100755
index 000000000..cdc77ff0c
--- /dev/null
+++ b/149/CH4/EX4.22/ques22.sce
@@ -0,0 +1,27 @@
+//ques22
+disp('Here we need to find find the limit of f(x) at x=0')
+syms x
+y=(x*%e^x-log(1+x))/x^2;
+//disp('The limit at x=0 is : ');
+//l=limit(y,x,0);
+//disp(l)
+f=1;
+while f==1
+yn=x*%e^x-log(1+x);
+yd=x^2;
+yn1=diff(yn,'x',1);
+yd1=diff(yd,'x',1);
+x=0;
+a=eval(yn1);
+b=eval(yd1);
+if a==b then
+ yn=yn1;
+ yd=yd1;
+else
+ f=0;
+
+end
+end
+h=a/b;
+disp(h);
+
diff --git a/149/CH4/EX4.32/ques32.sce b/149/CH4/EX4.32/ques32.sce
new file mode 100755
index 000000000..85964808f
--- /dev/null
+++ b/149/CH4/EX4.32/ques32.sce
@@ -0,0 +1,12 @@
+//ques 32
+disp('Equation of tangent');
+syms x a y;
+f=(a^(2/3)-x^(2/3))^(3/2);
+s=diff(f,x);
+
+Y1=s*(-x)+y;
+X1=-y/s*x;
+g=x-(Y1-s*(X1-x));
+disp('Equation is g=0 where g is');
+disp(g);
+
diff --git a/149/CH4/EX4.34/ques34.sce b/149/CH4/EX4.34/ques34.sce
new file mode 100755
index 000000000..215eca563
--- /dev/null
+++ b/149/CH4/EX4.34/ques34.sce
@@ -0,0 +1,10 @@
+//ques34
+disp('Equation of tangent');
+syms x a t y
+xo=a*(cos(t)+t*sin(t));
+yo=a*(sin(t)-t*cos(t));
+s=diff(xo,t)/diff(yo,t);
+y=yo+s*(x-xo);
+disp('y=');
+disp(y);
+
diff --git a/149/CH4/EX4.35/ques35.sce b/149/CH4/EX4.35/ques35.sce
new file mode 100755
index 000000000..54b58540c
--- /dev/null
+++ b/149/CH4/EX4.35/ques35.sce
@@ -0,0 +1,17 @@
+//ques35
+disp("The two given curves are x^=4y and y^2=4x which intersects at (0,0) and (4,4)');
+disp('for (4,4)');
+x=4;
+syms x
+y1=x^2/4;
+y2=2*x^(1/2);
+m1=diff(y1,x,1);
+m2=diff(y2,x,1);
+x=4;
+m1=eval(m1);
+m2=eval(m2);
+
+disp('Angle between them is(radians) :-');
+t=atan((m1-m2)/(1+m1*m2));
+disp(t);
+
diff --git a/149/CH4/EX4.37/ques37.sce b/149/CH4/EX4.37/ques37.sce
new file mode 100755
index 000000000..fb932fa96
--- /dev/null
+++ b/149/CH4/EX4.37/ques37.sce
@@ -0,0 +1,26 @@
+//ques37
+syms a t
+x=a*(cos(t)+log(tan(t/2)));
+y=a*sin(t);
+s=diff(x,t,1)/diff(y,t,1);
+disp('length of tangent ');
+l=y*(1+s)^(0.5);
+disp(l);
+disp('checking for its dependency on t')
+
+f=1
+t=0;
+k=eval(l);
+for i=1:10
+ t=i;
+ if(eval(l)~=k)
+ f=0;
+ end
+end
+if(f==1)
+ disp("verified and equal to a");
+ disp('subtangent');
+ m=y/s;
+ disp(m);
+
+ \ No newline at end of file
diff --git a/149/CH4/EX4.39/ques39.sce b/149/CH4/EX4.39/ques39.sce
new file mode 100755
index 000000000..2b549d92b
--- /dev/null
+++ b/149/CH4/EX4.39/ques39.sce
@@ -0,0 +1,14 @@
+//ques39
+clc
+disp('Angle of intersection');
+disp('point of intersection of r=sint+cost and r=2sint is t=pi/4 ');
+disp('tanu=dQ/dr*r');
+syms Q ;
+
+r1=2*sin(Q);
+r2=sin(Q)+cos(Q);
+u=atan(r1*diff(r2,Q,1));
+Q=%pi/4;
+u=eval(u);
+disp('The angle at point of intersection in radians is : ');
+disp(u);
diff --git a/149/CH4/EX4.4.1/ques4_1.sce b/149/CH4/EX4.4.1/ques4_1.sce
new file mode 100755
index 000000000..972cc4ad8
--- /dev/null
+++ b/149/CH4/EX4.4.1/ques4_1.sce
@@ -0,0 +1,17 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' we have to find yn for F=cosxcos2xcos3x ');
+syms x
+F=cos(x)*cos(2*x)*cos(3*x);
+n=input('Enter the order of differentiation ");
+disp('calculating yn ');
+yn=diff(F,x,n)
+disp('the expression for yn is ');
+disp(yn);
+
+
diff --git a/149/CH4/EX4.41/ques41.sce b/149/CH4/EX4.41/ques41.sce
new file mode 100755
index 000000000..f8bfcf53c
--- /dev/null
+++ b/149/CH4/EX4.41/ques41.sce
@@ -0,0 +1,16 @@
+//ques41
+clc
+disp('tanu=dQ/dr*r');
+syms Q a;
+
+r=2*a/(1-cos(Q));
+
+u=atan(r/diff(r2,Q,1));
+u=eval(u);
+p=r*sin(u);
+syms r;
+Q=acos(1-2*a/r);
+
+//cos(Q)=1-2*a/r;
+p=eval(p);
+disp(p);
diff --git a/149/CH4/EX4.43/ques43.sce b/149/CH4/EX4.43/ques43.sce
new file mode 100755
index 000000000..79ac06619
--- /dev/null
+++ b/149/CH4/EX4.43/ques43.sce
@@ -0,0 +1,11 @@
+//ques43
+syms a t
+x=a*(t+sin(t));
+y=a*(1-cos(t));
+s2=diff(y,t,2)/diff(x,t,2);
+s1=diff(y,t,1)/diff(x,t,1);
+
+r=(1+s1^2)^(3/2)/s2;
+disp('The radius of curvature is : ');
+disp(r);
+
diff --git a/149/CH4/EX4.46/ques46.sce b/149/CH4/EX4.46/ques46.sce
new file mode 100755
index 000000000..aa123fa14
--- /dev/null
+++ b/149/CH4/EX4.46/ques46.sce
@@ -0,0 +1,11 @@
+//ques46
+disp('radius of curvature');
+syms a t
+r=a*(1-cos(t));
+r1=diff(r,t,1);
+l=(r^2+r1^2)^(3/2)/(r^2+2*r1^2-r*r1);
+syms r;
+t=acos(1-r/a);
+l=eval(l);
+disp(l);
+disp('Which is proportional to r^0.5');
diff --git a/149/CH4/EX4.47/ques47.sce b/149/CH4/EX4.47/ques47.sce
new file mode 100755
index 000000000..5775b1e4d
--- /dev/null
+++ b/149/CH4/EX4.47/ques47.sce
@@ -0,0 +1,14 @@
+//qus47
+disp('The centre of curvature');
+syms x a y
+y=2*(a*x)^0.5;
+y1=diff(y,x,1);
+y2=diff(y,x,2);
+xx=x-y1*(1+y1)^2/y2;
+yy=y+(1+y1^2)/y2;
+disp('the coordinates x,y are resp :');
+
+disp(xx);
+disp(yy);
+
+
diff --git a/149/CH4/EX4.48/ques48.sce b/149/CH4/EX4.48/ques48.sce
new file mode 100755
index 000000000..d24dccc2d
--- /dev/null
+++ b/149/CH4/EX4.48/ques48.sce
@@ -0,0 +1,14 @@
+//ques48
+disp('centre of curvature of given cycloid ');
+syms a t
+x=a*(t-sin(t));
+y=a*(1-cos(t));
+y1=diff(y,t,1);
+y2=diff(y,t,2);
+xx=x-y1*(1+y1)^2/y2;
+yy=y+(1+y1^2)/y2;
+
+disp('the coordinates x,y are resp :');
+disp(xx);
+disp(yy);
+disp('which another parametric equation of cycloid ');
diff --git a/149/CH4/EX4.5/ques5.sce b/149/CH4/EX4.5/ques5.sce
new file mode 100755
index 000000000..2a705b8e5
--- /dev/null
+++ b/149/CH4/EX4.5/ques5.sce
@@ -0,0 +1,17 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' we have to find yn for F=cosxcos2xcos3x ');
+syms x
+F=x/((x-1)*(2*x+3));
+n=input('Enter the order of differentiation : ");
+disp('calculating yn ');
+yn=diff(F,x,n)
+disp('the expression for yn is ');
+disp(yn);
+
+
diff --git a/149/CH4/EX4.52/ques52.sce b/149/CH4/EX4.52/ques52.sce
new file mode 100755
index 000000000..a4128a8bc
--- /dev/null
+++ b/149/CH4/EX4.52/ques52.sce
@@ -0,0 +1,10 @@
+//error
+//ques52
+disp('To find the maxima and minima of given function put f1(x)=0');
+syms x
+//x=poly(0,'x');
+f=3*x^4-2*x^3-6*x^2+6*x+1;
+k=diff(f,x);
+x=poly(0,'x');
+k=eval(k);
+
diff --git a/149/CH4/EX4.6/ques6.sce b/149/CH4/EX4.6/ques6.sce
new file mode 100755
index 000000000..8eeda78a0
--- /dev/null
+++ b/149/CH4/EX4.6/ques6.sce
@@ -0,0 +1,17 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' we have to find yn for F=cosxcos2xcos3x ');
+syms x a
+F=x/(x^2+a^2);
+n=input('Enter the order of differentiation : ");
+disp('calculating yn ');
+yn=diff(F,x,n)
+disp('the expression for yn is ');
+disp(yn);
+
+
diff --git a/149/CH4/EX4.61/ques61.sce b/149/CH4/EX4.61/ques61.sce
new file mode 100755
index 000000000..5a6537265
--- /dev/null
+++ b/149/CH4/EX4.61/ques61.sce
@@ -0,0 +1,13 @@
+//ques 61
+clc
+disp('to find the assymptote of given curve ');
+syms x y
+f=x^2*y^2-x^2*y-x*y^2+x+y+1;
+//a=degrees(f,x);
+f1=coeffs(f,x,2);
+disp('assymptotes parallel to x-xis is given by f1=0 where f1 is :');
+disp(factor(f1));
+f2=coeffs(f,y,2);
+disp('assymptotes parallel to y-axis is given by f2=0 and f2 is :');
+disp(factor(f2));
+ \ No newline at end of file
diff --git a/149/CH4/EX4.7/ques7.sce b/149/CH4/EX4.7/ques7.sce
new file mode 100755
index 000000000..cf107c984
--- /dev/null
+++ b/149/CH4/EX4.7/ques7.sce
@@ -0,0 +1,17 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' we have to find yn for F=cosxcos2xcos3x ');
+syms x a
+F=%e^(x)*(2*x+3)^3;
+//n=input('Enter the order of differentiation : ");
+disp('calculating yn ');
+yn=diff(F,x,n)
+disp('the expression for yn is ');
+disp(yn);
+
+
diff --git a/149/CH4/EX4.8/ques8.sce b/149/CH4/EX4.8/ques8.sce
new file mode 100755
index 000000000..8b19bb92f
--- /dev/null
+++ b/149/CH4/EX4.8/ques8.sce
@@ -0,0 +1,23 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' y=(sin^-1)x) --sign inverse x ');
+syms x
+y=(asin(x))^2;
+disp('we have to prove (1-x^2)y(n+2)-(2n+1)xy(n+1)-n^2yn ') ;
+//n=input('Enter the order of differentiation ");
+disp('calculating yn for various values of n');
+for n=1:4
+
+ F=(1-x^2)*diff(y,x,n+2)-(2*n+1)*x*diff(y,x,n+1)-(n^2+a^2)*diff(y,x,n);
+ disp(n);
+ disp('the expression for yn is ');
+ disp(F);
+ disp('Which is equal to 0 ');
+
+end
+disp('Hence proved');
diff --git a/149/CH4/EX4.9/ques9.sce b/149/CH4/EX4.9/ques9.sce
new file mode 100755
index 000000000..364058990
--- /dev/null
+++ b/149/CH4/EX4.9/ques9.sce
@@ -0,0 +1,24 @@
+//ques4.1
+//clear
+//cd SCI
+//cd ("..")
+//cd ("..")
+//exec symbolic.sce
+clc
+disp(' y=e^(a(sin^-1)x)) --sign inverse x ');
+syms x a
+y=%e^(a*(asin(x)));
+disp('we have to prove (1-x^2)y(n+2)-(2n+1)xy(n+1)-(n^2+a^2)yn ') ;
+//n=input('Enter the order of differentiation ");
+disp('calculating yn for various values of n');
+for n=1:4
+
+ //yn=diff(F,x,n)
+ F=(1-x^2)*diff(y,x,n+2)-(2*n+1)*x*diff(y,x,n+1)-(n^2+a^2)*diff(y,x,n);
+ disp(n);
+ disp('the expression for yn is ');
+ disp(F);
+ disp('Which is equal to 0 ');
+
+end
+disp('Hence proved');