You are on page 1of 6

syms x y

p=(x+y)^2
p =
(x + y)^2
q=(x-y)^2
q =
(x - y)^2
s=p+q
s =
(x - y)^2 + (x + y)^2
s=simplify(p+q)
s =
2*x^2 + 2*y^2
a=subs(p,x,3)
a =
(y + 3)^2
f=(x^3 - 6*x^2+8
??? f=(x^3 - 6*x^2+8
|
{Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
}
f=x^3 - 6*x^2+8
f =
x^3 - 6*x^2 + 8
subs(f,3)
ans =
-19
sym x k
{??? Error using ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2010a\
toolbox\symbolic\symbolic\@sym\sym.m',2180,0)">sym.sym>assumptions at 2180</a>
Second argument k not recognized.
Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2010a\toolbox
\symbolic\symbolic\@sym\sym.m',2148,0)">sym.sym>tomupad at 2148</a>
assumptions(S,x,a);
Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2010a\toolbox
\symbolic\symbolic\@sym\sym.m',114,0)">sym.sym>sym.sym at 114</a>
S.s = tomupad(x,a);

}
syms x k
symsum(x^k,k,0,7)
ans =
x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1
symsum(x^k,k,0,inf)
ans =
piecewise([1 <= x, Inf], [abs(x) < 1, -1/(x - 1)])
symsum(1/(k^2),0,inf)
{??? Error using ==> mupadmex
Error in MuPAD command: Singularity [sum::sum]
Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2010a\toolbox
\symbolic\symbolic\@sym\symsum.m',74,0)">sym.symsum at 74</a>
r = mupadmex('mllib::map',f.s,'mllib::symsum',x.s,a.s,b.s);
}
symsum(1/(k^2),k,0,inf)
{??? Error using ==> mupadmex
Error in MuPAD command: Singularity [sum::sum]
Error in ==> <a href="matlab: opentoline('C:\Program Files\MATLAB\R2010a\toolbox
\symbolic\symbolic\@sym\symsum.m',74,0)">sym.symsum at 74</a>
r = mupadmex('mllib::map',f.s,'mllib::symsum',x.s,a.s,b.s);
}
symsum(1/(k^2),k,1,inf)
ans =
pi^2/6
symsum(1/(k^2),k,1,7)
ans =
266681/176400
syms x h
limit ((cos(x+h)-cos(x-h))/h,h,0)
ans =
(-2)*sin(x)
limit(sin(x)/x)
ans =
1
limit(1/x,0)
ans =
NaN

limit(1/x,x,0,'right')
ans =
Inf
limit(1/x,x,0,'left')
ans =
-Inf
syms a b x
limit((cos(a*(x+h)+b)-cos(a*x+b))/h,h,0)
ans =
-a*sin(b + a*x)
limit((exp(x+h)-exp(x))/h,h,0)
ans =
exp(x)
limit((x^3-6*x^2+8*x)/(4*x^5+4*x-2),x,inf)
ans =
0
limit((2*x^4+6*x^3-8*x+2)/(x^2+4*x-1),x,inf)
ans =
Inf
syms a b x
f=sin(a*x^2+b*x+c)
{??? Undefined function or variable 'c'.
}
syms a b x c
f=sin(a*x^2+b*x+c)
f =
sin(a*x^2 + b*x + c)
g=diff(f)
g =
cos(a*x^2 + b*x + c)*(b + 2*a*x)
ga=diff(f,a)
ga =
x^2*cos(a*x^2 + b*x + c)

ga=diff(f,b)
ga =
x*cos(a*x^2 + b*x + c)
f=exp(x^2-6*x+8)
f =
exp(x^2 - 6*x + 8)
g=diff(f,x)
g =
exp(x^2 - 6*x + 8)*(2*x - 6)
g2=diff(f,x2)
{??? Undefined function or variable 'x2'.
}
g2=diff(f,x.2)
??? g2=diff(f,x.2)
|
{Error: Unexpected MATLAB expression.
}
syms x
diff(exp(x^2-6*x+8))
ans =
exp(x^2 - 6*x + 8)*(2*x - 6)
diff(exp(x^2-6*x+8),2)
ans =
2*exp(x^2 - 6*x + 8) + exp(x^2 - 6*x + 8)*(2*x - 6)^2
h=(3*x^2+5*y^2-7*x*y)
h =
3*x^2 - 7*x*y + 5*y^2
h1=diff(h,y)
h1 =
10*y - 7*x
h2=diff(h,x)
h2 =
6*x - 7*y
h12=diff(h1,y)

h12 =
10
h21=diff(h2,y)
h21 =
-7
syms n x
int(x^h)
{Warning: Explicit integral could not be found. }
ans =
int(x^(3*x^2 - 7*x*y + 5*y^2), x)
syms n x
int(x^n)
ans =
piecewise([n = -1, log(x)], [n <> -1, x^(n + 1)/(n + 1)])
g=cos(a*x+b)
g =
cos(b + a*x)
h=int(g)
h =
sin(b + a*x)/a
h=int(g,0,pi/2)
h =
(sin(b + (pi*a)/2) - sin(b))/a
f=sqrt(x)*log(x)
f =
x^(1/2)*log(x)
F=int(f)
F =
(2*x^(3/2)*(log(x) - 2/3))/3
a=int(f,0,1)
a =
-4/9

f1=exp(-x^2)
f1 =
1/exp(x^2)
b=int(f1,0,inf)
b =
pi^(1/2)/2

You might also like