Friday, 1 August 2014
Wednesday, 9 April 2014
Runge-Kutta 4th order method
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x,float y)
{
return((1+0.3*x*x*x+0.4*y*y*y)/(1+0.3*x*x+0.4*y*y));
}
void main()
{
float x0,y0,h,x,y1,k1,k2,k3,k4;
clrscr();
printf("\nEnter the initial value of x:");
scanf("%f",&x0);
printf("\nEnter the initial value of y:");
scanf("%f",&y0);
printf("\nEnter the value to be determined:");
scanf("%f",&x);
printf("\nEnter the step length:");
scanf("%f",&h);
while(x0<x)
{
k1=h*f(x0,y0);
k2=h*f(x0+h/2,y0+k1/2);
k3=h*f(x0+h/2,y0+k2/2);
k4=h*f(x0+h,y0+k3);
x0+=h;
y1=y0+(k1+2*k2+2*k3+k4)/6;
printf("\n\t\t y(%0.1f)=%0.5f",x0,y1);
y0=y1;
}
printf("\n\n\n Hence the required value of y(%0.1f)=%0.5f(correct to 5D)",x0,y1);
getch();
}
#include<conio.h>
#include<math.h>
float f(float x,float y)
{
return((1+0.3*x*x*x+0.4*y*y*y)/(1+0.3*x*x+0.4*y*y));
}
void main()
{
float x0,y0,h,x,y1,k1,k2,k3,k4;
clrscr();
printf("\nEnter the initial value of x:");
scanf("%f",&x0);
printf("\nEnter the initial value of y:");
scanf("%f",&y0);
printf("\nEnter the value to be determined:");
scanf("%f",&x);
printf("\nEnter the step length:");
scanf("%f",&h);
while(x0<x)
{
k1=h*f(x0,y0);
k2=h*f(x0+h/2,y0+k1/2);
k3=h*f(x0+h/2,y0+k2/2);
k4=h*f(x0+h,y0+k3);
x0+=h;
y1=y0+(k1+2*k2+2*k3+k4)/6;
printf("\n\t\t y(%0.1f)=%0.5f",x0,y1);
y0=y1;
}
printf("\n\n\n Hence the required value of y(%0.1f)=%0.5f(correct to 5D)",x0,y1);
getch();
}
Tuesday, 1 April 2014
Gauss–Seidel method
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define ESP 0.0001
#define X1(x2,x3) ((17 - 20*(x2) + 2*(x3))/20)
#define X2(x1,x3) ((-18 - 3*(x1) + (x3))/20)
#define X3(x1,x2) ((25 - 2*(x1) + 3*(x2))/20)
void main()
{
double x1=0,x2=0,x3=0,y1,y2,y3;
int i=0;
clrscr();
printf("\n__________________________________________\n");
printf("\n x1\t\t x2\t\t x3\n");
printf("\n__________________________________________\n");
printf("\n%f\t%f\t%f",x1,x2,x3);
do
{
y1=X1(x2,x3);
y2=X2(y1,x3);
y3=X3(y1,y2);
if(fabs(y1-x1)<ESP && fabs(y2-x2)<ESP && fabs(y3-x3)<ESP )
{
printf("\n__________________________________________\n");
printf("\n\nx1 = %.3lf",y1);
printf("\n\nx2 = %.3lf",y2);
printf("\n\nx3 = %.3lf",y3);
i = 1;
}
else
{
x1 = y1;
x2 = y2;
x3 = y3;
printf("\n%f\t%f\t%f",x1,x2,x3);
}
}while(i != 1);
getch();
}
#include<conio.h>
#include<math.h>
#define ESP 0.0001
#define X1(x2,x3) ((17 - 20*(x2) + 2*(x3))/20)
#define X2(x1,x3) ((-18 - 3*(x1) + (x3))/20)
#define X3(x1,x2) ((25 - 2*(x1) + 3*(x2))/20)
void main()
{
double x1=0,x2=0,x3=0,y1,y2,y3;
int i=0;
clrscr();
printf("\n__________________________________________\n");
printf("\n x1\t\t x2\t\t x3\n");
printf("\n__________________________________________\n");
printf("\n%f\t%f\t%f",x1,x2,x3);
do
{
y1=X1(x2,x3);
y2=X2(y1,x3);
y3=X3(y1,y2);
if(fabs(y1-x1)<ESP && fabs(y2-x2)<ESP && fabs(y3-x3)<ESP )
{
printf("\n__________________________________________\n");
printf("\n\nx1 = %.3lf",y1);
printf("\n\nx2 = %.3lf",y2);
printf("\n\nx3 = %.3lf",y3);
i = 1;
}
else
{
x1 = y1;
x2 = y2;
x3 = y3;
printf("\n%f\t%f\t%f",x1,x2,x3);
}
}while(i != 1);
getch();
}
Gauss Elimination Method
#include<stdio.h>
#include<math.h>
int main()
{
int n=3,i,j,k;
float a[10][10],c[10],x[10];
printf("Enter the no. of equations :\n");
scanf("%d", &n);
printf("Enter the right hand side of equation ");
for(i=0;i<=n-1;i++)
{
scanf("%f",&c[i]);
}
for(i=0;i<=n-1;i++)
{
printf("Enter the coefficient of equation %d.\n",i+1);
for(j=0;j<=n-1;j++)
{
scanf("%f",&a[i][j]);
}
}
for(k=0;k<=n-2;k++)
{
for(i=k+1;i<=n-1;i++)
{
for(j=k+1;j<=n-1;j++)
{
a[i][j]=a[i][j]-((a[i][k]/a[k][k])*a[k][j]);
}
c[i]=c[i]-((a[i][k]/a[k][k])*c[k]);
}
}
for(i=0;i<=n-1;i++)
{
for(j=0;j<=n-1;j++)
{
printf("%f ",a[i][j]);
}
printf("\n");
}
printf("\n");
x[n-1]=c[n-1]/a[n-1][n-1];
printf("The solution is :\n");
printf("x[%d] = %f\n",n-1,x[n-1]);
for(k=0;k<=n-2;k++)
{
i=n-k-2;
for(j=i+1;j<=n-1;j++)
{
c[i]=c[i]-(a[i][j]*x[j]);
}
x[i]=c[i]/a[i][i];
printf("x[%d] = %f\n",i,x[i]);
}
return 0;
}
#include<math.h>
int main()
{
int n=3,i,j,k;
float a[10][10],c[10],x[10];
printf("Enter the no. of equations :\n");
scanf("%d", &n);
printf("Enter the right hand side of equation ");
for(i=0;i<=n-1;i++)
{
scanf("%f",&c[i]);
}
for(i=0;i<=n-1;i++)
{
printf("Enter the coefficient of equation %d.\n",i+1);
for(j=0;j<=n-1;j++)
{
scanf("%f",&a[i][j]);
}
}
for(k=0;k<=n-2;k++)
{
for(i=k+1;i<=n-1;i++)
{
for(j=k+1;j<=n-1;j++)
{
a[i][j]=a[i][j]-((a[i][k]/a[k][k])*a[k][j]);
}
c[i]=c[i]-((a[i][k]/a[k][k])*c[k]);
}
}
for(i=0;i<=n-1;i++)
{
for(j=0;j<=n-1;j++)
{
printf("%f ",a[i][j]);
}
printf("\n");
}
printf("\n");
x[n-1]=c[n-1]/a[n-1][n-1];
printf("The solution is :\n");
printf("x[%d] = %f\n",n-1,x[n-1]);
for(k=0;k<=n-2;k++)
{
i=n-k-2;
for(j=i+1;j<=n-1;j++)
{
c[i]=c[i]-(a[i][j]*x[j]);
}
x[i]=c[i]/a[i][i];
printf("x[%d] = %f\n",i,x[i]);
}
return 0;
}
Monday, 24 March 2014
Solve BT-MB SEM-4 CA-401
Internal Solve BT-MB SEM-4 CA-401
https://www.mediafire.com/?ujelebr4qpb43pn
https://www.mediafire.com/?ujelebr4qpb43pn
Wednesday, 20 November 2013
Thursday, 14 November 2013
Calcutta university 3rd year Envs fieldwork report
Calcutta university 3rd year ENVS fieldwork report
http://www.mediafire.com/download/7gjc40015m5jlij/New_folder.rar
http://www.mediafire.com/download/7gjc40015m5jlij/New_folder.rar
Friday, 30 August 2013
What is Infinity?
| Infinity ... | |
| ... it's not big ... | |
| ... it's not huge ... | |
| ... it's not tremendously large ... | |
| ... it's not extremely humongously enormous ... | |
| ... it's ... |
Endless!
Infinity is not a real number
Infinity is not a real number, it is an idea. An idea of something without an end.Infinity cannot be measured.
Even these faraway galaxies can't compete with infinity.
Here are some more properties:
| Special Properties of Infinity |
|---|
| ∞ + ∞ = ∞ |
| -∞ + -∞ = -∞ |
| ∞ × ∞ = ∞ |
| -∞ × -∞ = ∞ |
| -∞ × ∞ = -∞ |
| x + ∞ = ∞ |
| x + (-∞) = -∞ |
| x - ∞ = -∞ |
| x - (-∞) = ∞ |
| For x>0 : |
| x × ∞ = ∞ |
| x × (-∞) = -∞ |
| For x<0 : |
| x × ∞ = -∞ |
| x × (-∞) = ∞ |
Undefined Operations
All of these are "undefined":| "Undefined" Operations |
|---|
| 0 × ∞ |
| 0 × -∞ |
| ∞ + -∞ |
| ∞ - ∞ |
| ∞ / ∞ |
| ∞0 |
| 1∞ |
Example: Isn't ∞ / ∞ equal to 1?
No, because we really don't know how big infinity is, so we can't say that two infinities are the same. For example ∞ + ∞ = ∞, so
And that doesn't make sense!
I could have also made 1=3 and so on ... so we say that ∞ / ∞ is undefined.
No, because we really don't know how big infinity is, so we can't say that two infinities are the same. For example ∞ + ∞ = ∞, so
| ∞ | = | ∞ + ∞ | which would mean that: |
1 | = | 2 | |
| ∞ | ∞ | 1 | 1 |
I could have also made 1=3 and so on ... so we say that ∞ / ∞ is undefined.
Saturday, 24 August 2013
Pronunciation Guide to Mathematicians Name
Pronunciation Guide to Mathematicians
Abel, Niels Henrik (1802-1829) (Ä bul) Agnesi, Maria Gaetana (1718-1799) (an YAY zee)
Banach, Stefan (1892-1945) (BÄ näkh)
Berkeley, George (1685-1753) (BÄRK lee)
Bernoulli, Jakob/Jacques/James (1654-1705)(ber NOO lee)
Bernoulli, Johann/Jean/John (1667-1748) (ber NOO lee)
Bolzano, Bernhard (1781-1848) (bolt SÄ no)
Bolyai, János (1802-1860) (BOY AY)
Cauchy, Augustin-Louis (1789-1857) (ko SHE)
Cavalieri, Bonaventura (1598-1647) (kä val YAY ree)
Clairaut, Alexis-Claude (1713-1765) (kla ROW, as in row your boat)
d'Alembert, Jean Le Rond (1717-1783) (DÄ lam bâr)
Dedekind, Richard (1831-1916) (DA de kint)
Desargues, Girard (1591-1661) (day ZÄRG)
Descartes, Rene (1596-1650) (day CÄRT)
Dirichlet, Peter Lejune (1805-1859) (dee ree KLAY)
Euclid (YOU klid)
Eudoxus (408-355 B. C.) (you DOK sis)
Euler, Leonhard (1707-1783) (OI ler)
Fermat, Pierre de (1601-1655) (fer MÄ)
Fourier, Jean Baptiste Joseph (1768-1830) (foo RYAY)
Galois, Evariste (1811-1832) (gal WÄ)
Heine, Eduard (1821-1881) (HI na, not a long a)
Hermite, Charles (1822-1901) (er MEET)
Jordan, Camille (1838-1922) (abstract algebra) (zhâr DÄN)
Jordan, Wilhelm (1842-1899) (Gauss-Jordan Elimination) (your DÄN)
Kovalevskaya, Sofia (1850-1891) (kov a LEF skä yä)
Kronecker, Leopold (1823-1891) (KROW nek er)
Kummer, Ernst (1810-1893) (KUM er)
Lagrange, Joseph Louis (1736-1813) (la GRÄNZH)
Laplace, Pierre-Simon de (1749-1827) (la PLAS)
Lebesgue, Henri (1875-1941) (la BEG)
Lie, Sophus (1842-1899) (LEE)
Legendre, Adrien-Marie (1752-1833) (la ZHÄN dra)
Leibniz, Gottfried Wilhelm (1646-1716) (LIP nits, long i)
l'Hospital, Guillaume Francois (1661-1704) (lô pee TAL)
Monge, Gaspard (1746-1818) (MÔNZH)
Napier, John1550-1617) (NAY pee air)
Noether, Emmy (1882-1935) (NOO ta)
Peano, Guiseppe (1858-1932) (pay Ä no)
Poincaré, Henri (1854-1912) (pwan ka RAY)
Another Poincaré link
Riemann, Bernhard (1826-1866) (REE män)
Sylow, Ludwig (1826-1866) (SEE lov)
Thales (THAY leez)
Torricelli, Evangelista (1608-1647) (tor ree CHEL lee)
Weierstrass, Karl (1815-1897) (vi er shträs, long i)
Friday, 19 July 2013
Symbols
Symbols
Some symbols in no particular order: (Some symbols did not convert properly, will try to fix them.)
~ tilde
* asterisk
+ plus sign
- hyphen, minus sign
± plus or minus
∓ minus or plus
× multiplication sign
÷ division sign
• dot or bullet product
∘ ring operator
= equals
≡ is identical to
≠ is not equal to
≅ is approximately equal to
≈ almost equal to
≐ is nearly equal to
< less than
> greater than
≤ less than or equal to
≥ greater than or equal to
Ú much less than
ä much greater than
/ slash, solidus, virgule, division
\ reverse slash, solidus, set minus
| vertical line
‖ double vertical line, parallel
∅ empty or null set
ℏ h-bar (Planck constant over two pi)
ℕ natural numbers
ℙ prime numbers
ℤ integers
ℚ rational numbers
ℝ real numbers
ℂ complex numbers
ℍ quaternions (after Hamilton)
𝕆 octonions
ℜ real part
ℑ imaginary part
dx differential of x
Δx increment of x
∂ partial derivative
∫ integral
∬ double integral
∭ triple integral
∮ contour integral
∯ surface integral
∰ volume integral
( left parenthesis
) right parenthesis
[ ] left and right square brackets
{ } curly brackets or braces
⟨ ⟩ angle brackets
⟦ ⟧ double brackets
floor brackets
ceiling brackets
‖ ‖ double vertical line brackets
∊ is a member of
⊂ is contained in
∩ cap, intersection
∪ cup, union
∨ or
∧ and
→ arrow, implies
⇒ double arrow, if then
⋯ ellipsis
! exclamation point, factorial
factorial (old notation)
∞ infinity
∝ proportional to
∀ for all
∃ there exists
∄ there does not exist
→ therefore
∵ because
perpendicular
𝔃̅ or 𝔃* complex conjugate
ℜ, Re real part
ℑ, Im imaginary part
% per cent
‰ per mille
$ Dollar
£ Pound (British)
€ Euro
¥ Yen
Å Angstrom
∇ del or nabla
∇² Laplacian operator
∑ sum
∏ product
∶ ratio
∷ proportion
∝ is proportional to
& ampersand
℃ degrees Celsius
℉ degrees Fahrenheit
. decimal point
° degrees
9 minutes
0 seconds
lb pound(s)
Hz hertz
ℵ alef
ℵ0 alef null, naught, or zero
ℶ bet
ℷ gimel
ℸ dalet
à Weierstrass p
|x| absolute value of x
[x] or ⟦x⟧ integral part of x
x|y x divides y
√ square root
∛ cube root
∠ angle
͞͞͞ ͞ ͞ vinculum above
___ vinculum below
horizontal fraction bar
℄ center line symbol
† dagger
℈ scruple
≀ wreath product
A X B inner, vector, or cross, product
A ∙ B outer, scalar, or dot, product
■ end of proof
QED end of proof
Sunday, 12 May 2013
BT & MB SEM-IV Model Question Paper of COMPUTER CA-401
BT & MB SEM-IV Model Question Paper of COMPUTER CA-401
http://www.mediafire.com/view/?7yol42jc4h7l01e
http://www.mediafire.com/view/?7yol42jc4h7l01e
BBA SEM-II Model Question Paper of MATH & STAT
BBA SEM-II Model Question Paper of STAT
http://www.mediafire.com/view/?qaq9w2myu2212qu
BBA SEM-II Model Question Paper of MATH
http://www.mediafire.com/view/?odgglmeimuwwvel
http://www.mediafire.com/view/?qaq9w2myu2212qu
BBA SEM-II Model Question Paper of MATH
http://www.mediafire.com/view/?odgglmeimuwwvel
Saturday, 11 May 2013
Networking Final Note+HTML viva Qh & ans+ Practical Qh pattern
Click to downloads
http://www.mediafire.com/view/?kfwsoq6sjwndzmm
Click to downloads
http://www.mediafire.com/view/?h2irg04x1xgy4nj
Click to downloads
http://www.mediafire.com/view/?tqaw6njemfw2t73
http://www.mediafire.com/view/?kfwsoq6sjwndzmm
Click to downloads
http://www.mediafire.com/view/?h2irg04x1xgy4nj
Click to downloads
http://www.mediafire.com/view/?tqaw6njemfw2t73
Monday, 7 January 2013
calcutta university 3rd year Envs fieldwork report
Calcutta university 3rd year Envs fieldwork report
http://www.mediafire.com/download/7gjc40015m5jlij/New_folder.rar
http://www.mediafire.com/download/7gjc40015m5jlij/New_folder.rar
Sunday, 29 April 2012
NEWTON'S BACKWARD INTERPOLATION FORMULA
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int i,j,n,m;
clrscr();
printf("\t\t!! NEWTON GRAGORY BACKWARD INTERPOLATION FORMULA!!\n");
printf("\t\t\t\t By Biswadip Pal \t\t\n\n");
float x[20],y[20],d[20][20],a,h,u,b,z=1.0,k=0.0;
printf("Enter the no.s of entries i.e n:\n");
scanf("%d",&n);
printf("Enter the value of x.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&x[i]);
}
printf("Enter the value of y.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&y[i]);
}
for(i=1;i<=n;i++)
{
d[i][0]=y[i]-y[i-1];
}
for(j=1;j<=n-2;j++)
{
for(i=j+1;i<=n-1;i++)
{
d[i][j]=d[i][j-1]-d[i-1][j-1];
}
}
printf("%f %f\n",x[0],y[0]);
for(i=1;i<=n-1;i++)
{
printf("%f %f",x[i],y[i]);
for(j=0;j<=i-1;j++)
{
printf(" %f",d[i][j]);
}
printf("\n");
}
printf("Enter the value of x for which y is required\n");
scanf("%f",&a);
for(i=0;a>x[i];i++)
{
m=i;
}
m++;
h=x[1]-x[0];
u=(a-x[m])/h;
for(i=0;i<=m-1;i++)
{
z*=(u+i)/(i+1);
k+=(z*d[m][i]);
}
b=y[m]+k;
printf("\n The value of y at %f = %f\n",a,b);
return 0;
}
#include<conio.h>
#include<math.h>
int main()
{
int i,j,n,m;
clrscr();
printf("\t\t!! NEWTON GRAGORY BACKWARD INTERPOLATION FORMULA!!\n");
printf("\t\t\t\t By Biswadip Pal \t\t\n\n");
float x[20],y[20],d[20][20],a,h,u,b,z=1.0,k=0.0;
printf("Enter the no.s of entries i.e n:\n");
scanf("%d",&n);
printf("Enter the value of x.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&x[i]);
}
printf("Enter the value of y.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&y[i]);
}
for(i=1;i<=n;i++)
{
d[i][0]=y[i]-y[i-1];
}
for(j=1;j<=n-2;j++)
{
for(i=j+1;i<=n-1;i++)
{
d[i][j]=d[i][j-1]-d[i-1][j-1];
}
}
printf("%f %f\n",x[0],y[0]);
for(i=1;i<=n-1;i++)
{
printf("%f %f",x[i],y[i]);
for(j=0;j<=i-1;j++)
{
printf(" %f",d[i][j]);
}
printf("\n");
}
printf("Enter the value of x for which y is required\n");
scanf("%f",&a);
for(i=0;a>x[i];i++)
{
m=i;
}
m++;
h=x[1]-x[0];
u=(a-x[m])/h;
for(i=0;i<=m-1;i++)
{
z*=(u+i)/(i+1);
k+=(z*d[m][i]);
}
b=y[m]+k;
printf("\n The value of y at %f = %f\n",a,b);
return 0;
}
Newton's forward interpolation
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
clrscr();
printf("\t\t!! NEWTON GRAGORY FORWARD INTERPOLATION FORMULA!!\n");
printf("\t\t\t\t By Biswadip Pal \t\t\n\n");
int i,j,n,m;
float x[20],y[20],d[20][20],a,h,u,b,z=1.0,k=0.0;
printf("Enter the no.s of entries i.e n:\n");
scanf("%d",&n);
printf("Enter the value of x.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&x[i]);
}
printf("Enter the value of y.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&y[i]);
}
for(i=0;i<=n-1;i++)
{
d[i][0]=y[i+1]-y[i];
}
for(j=1;j<=n-2;j++)
{
for(i=0;i<=n-j-2;i++)
{
d[i][j]=d[i+1][j-1]-d[i][j-1];
}
}
for(i=0;i<=n-1;i++)
{
printf("%f %f",x[i],y[i]);
for(j=0;j<=n-i-2;j++)
{
printf(" %f",d[i][j]);
}
printf("\n");
}
printf("Enter the value of x for which y is required\n");
scanf("%f",&a);
for(i=0;a>x[i];i++)
{
m=i;
}
h=x[1]-x[0];
u=(a-x[m])/h;
for(i=0;i<=n-m-2;i++)
{
z*=(u-i)/(i+1);
k+=(z*d[m][i]);
}
b=y[m]+k;
printf("\n The value of y at %f = %f\n",a,b);
return 0;
}
#include<conio.h>
#include<math.h>
int main()
{
clrscr();
printf("\t\t!! NEWTON GRAGORY FORWARD INTERPOLATION FORMULA!!\n");
printf("\t\t\t\t By Biswadip Pal \t\t\n\n");
int i,j,n,m;
float x[20],y[20],d[20][20],a,h,u,b,z=1.0,k=0.0;
printf("Enter the no.s of entries i.e n:\n");
scanf("%d",&n);
printf("Enter the value of x.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&x[i]);
}
printf("Enter the value of y.\n");
for(i=0;i<=n-1;i++)
{
scanf("%f",&y[i]);
}
for(i=0;i<=n-1;i++)
{
d[i][0]=y[i+1]-y[i];
}
for(j=1;j<=n-2;j++)
{
for(i=0;i<=n-j-2;i++)
{
d[i][j]=d[i+1][j-1]-d[i][j-1];
}
}
for(i=0;i<=n-1;i++)
{
printf("%f %f",x[i],y[i]);
for(j=0;j<=n-i-2;j++)
{
printf(" %f",d[i][j]);
}
printf("\n");
}
printf("Enter the value of x for which y is required\n");
scanf("%f",&a);
for(i=0;a>x[i];i++)
{
m=i;
}
h=x[1]-x[0];
u=(a-x[m])/h;
for(i=0;i<=n-m-2;i++)
{
z*=(u-i)/(i+1);
k+=(z*d[m][i]);
}
b=y[m]+k;
printf("\n The value of y at %f = %f\n",a,b);
return 0;
}
Bisection method
#include <math.h>
#include<conio.h>
#define ESP 0.000001
#define F(x) tan(x)+1.45*(sin(x))*(sin(x))-1
void main()
{
int i = 1;
float x0,x1,x2;
double f1,f2,f0,t;
clrscr();
printf("\nEnter the value of x0: ");
scanf("%f",&x0);
printf("\nEnter the value of x1: ");
scanf("%f",&x1);
printf("\n__________________________________________________________________\n");
printf("\niteration\t x0\t x1\t x2\t f0\t f1\t f2");
printf("\n___________________________________________________________________\n");
do
{
x2=(x0+x1)/2;
f0=F(x0);
f1=F(x1);
f2=F(x2);
printf("\n%d %f %f %f %lf %lf %lf", i, x0,x1,x2,f0,f1,f2);
if(f0*f2<0)
{
x1=x2;
}
else
{
x0=x2;
}
i++;
}while(fabs(f2)>ESP);
printf("\n__________________________________________________________\n");
printf("\n\nApp.root = %.6f",x2);
getch();
}
#include<conio.h>
#define ESP 0.000001
#define F(x) tan(x)+1.45*(sin(x))*(sin(x))-1
void main()
{
int i = 1;
float x0,x1,x2;
double f1,f2,f0,t;
clrscr();
printf("\nEnter the value of x0: ");
scanf("%f",&x0);
printf("\nEnter the value of x1: ");
scanf("%f",&x1);
printf("\n__________________________________________________________________\n");
printf("\niteration\t x0\t x1\t x2\t f0\t f1\t f2");
printf("\n___________________________________________________________________\n");
do
{
x2=(x0+x1)/2;
f0=F(x0);
f1=F(x1);
f2=F(x2);
printf("\n%d %f %f %f %lf %lf %lf", i, x0,x1,x2,f0,f1,f2);
if(f0*f2<0)
{
x1=x2;
}
else
{
x0=x2;
}
i++;
}while(fabs(f2)>ESP);
printf("\n__________________________________________________________\n");
printf("\n\nApp.root = %.6f",x2);
getch();
}
Monday, 5 December 2011
CU Part-I result
Probably CU Part-I 2011 result vl b published on Dec 9 or 13.
Thursday, 27 October 2011
CU Part-II result
Probably CU Part-II 2011 result vl b published on Nov 8.
Tuesday, 2 August 2011
WB JECA Result 2011
Probably WB JECA 2011 result will be published 03 Aug 2011....no more news frnds!!
Subscribe to:
Posts (Atom)