Untitled

> restart;

> f:=1/(1+x^2);

f := 1/(1+x^2)

> df:=diff(f,x);

df := -2*x/(1+x^2)^2

> a:=int(sqrt(1+df^2),x=0..2);

a := int((1+4*x^2/(1+x^2)^4)^(1/2), x = 0 .. 2)

> evalf(a);

2.177856709

> eq1 := y = 4*x-x^2;

eq1 := y = 4*x-x^2

> eq2 := y = x;

eq2 := y = x

> solve({eq1, eq2}, {x, y});

{x = 0, y = 0}, {x = 3, y = 3}

> A := int(4*x-x^2-x, x = 0 .. 3);

A := 9/2

> p:=4*x-x^2;

p := 4*x-x^2

> plot([p,x],x=0..3);

[Plot]

> xbar:=1/A*int(x*(p-x),x=0..3);

xbar := 3/2

> ybar:=1/A*int((p+x)/2*(p-x),x=0..3);

ybar := 12/5

> series(exp(h),h=0);

series(1+h+1/2*h^2+1/6*h^3+1/24*h^4+1/120*h^5+O(h^6),h,6)

> series(sin(h),h=0,10);

series(h-1/6*h^3+1/120*h^5-1/5040*h^7+1/362880*h^9+O(h^10),h,10)

> s1:=series(cos(sin(h)),h=0,10);

s1 := series(1-1/2*h^2+5/24*h^4-37/720*h^6+457/40320*h^8+O(h^10),h,10)

> s2:=series(cos(h),h=0,10);

s2 := series(1-1/2*h^2+1/24*h^4-1/720*h^6+1/40320*h^8+O(h^10),h,10)

> n1:=cos(sin(h))-cos(h);

n1 := cos(sin(h))-cos(h)

> d1:=h^4;

d1 := h^4

> n2:=diff(n1,h$4);

n2 := cos(sin(h))*cos(h)^4-6*sin(sin(h))*cos(h)^2*sin(h)-3*cos(sin(h))*sin(h)^2+4*cos(sin(h))*cos(h)^2-sin(sin(h))*sin(h)-cos(h)

> d2:=diff(d1,h$4);

d2 := 24

> a2:=subs(h=0,n2/d2);

a2 := 1/24*cos(sin(0))*cos(0)^4-1/4*sin(sin(0))*cos(0)^2*sin(0)-1/8*cos(sin(0))*sin(0)^2+1/6*cos(sin(0))*cos(0)^2-1/24*sin(sin(0))*sin(0)-1/24*cos(0)

> simplify(a2);

1/6

>