Vous êtes sur la page 1sur 4

f1=dsolve('Dy=sin(x)+3*cos(x)+4','y(1)=2','x')

f1 =

4*x - 6*cos(1/2)*sin(1/2) - 2*cos(x/2)^2 + 2*cos(1/2)^2 + 6*cos(x/2)*sin(x/2) - 2

G=inline(f1)

G =

Inline function:
G(x) = x.*4.0-cos(1.0./2.0).*sin(1.0./2.0).*6.0-
cos(x.*(1.0./2.0)).^2.*2.0+cos(1.0./2.0).^2.*2.0+cos(x.*(1.0./2.0)).*sin(x.*(1.0./2
.0)).*6.0-2.0

x=1:0.01:6;
d=G(x);
plot(x,d)
%segundo
f2=dsolve('Dy=x*(x+a)*(x+b)','y(1)=2','x')

f2 =

x^4/4 + (a/3 + b/3)*x^3 + (a*b*x^2)/2 - a/3 - b/3 - (a*b)/2 + 7/4

H=inline(f2)

H =

Inline function:
H(a,b,x) = a.*(-1.0./3.0)-b.*(1.0./3.0)+x.^3.*(a.*(1.0./3.0)+b.*(1.0./3.0))-
a.*b.*(1.0./2.0)+x.^4.*(1.0./4.0)+a.*b.*x.^2.*(1.0./2.0)+7.0./4.0

f2=dsolve('Dy=(x^2+1)*(x^2-2)/x^(2/3)','y(1)=2','x')

f2 =

746/91 - (3*x^(1/3)*(- 7*x^4 + 13*x^2 + 182))/91

f3=dsolve('Dy=(x^2+1)*(x^2-2)/x^(2/3)','y(1)=2','x')

f3 =

746/91 - (3*x^(1/3)*(- 7*x^4 + 13*x^2 + 182))/91

I=inline(f3)

I =

Inline function:
I(x) = x.^(1.0./3.0).*(x.^2.*1.3e1-x.^4.*7.0+1.82e2).*(-
3.0./9.1e1)+7.46e2./9.1e1

a=I(x);
plot(x,a)
f4=dsolve('Dy=1/x^2-10','y(1)=2','x')

f4 =
13 - 1/x - 10*x

f5=dsolve('Dy=1/(x^2-10)','y(1)=2','x')

f5 =

(10^(1/2)*atanh(10^(1/2)/10))/10 - (10^(1/2)*atanh((10^(1/2)*x)/10))/10 + 2

f6=dsolve('Dy=(sin(x/2))^2','y(1)=2','x')

f6 =

x/2 + sin(1)/2 - sin(x)/2 + 3/2

U=inline(f6)

U =

Inline function:
U(x) = x.*(1.0./2.0)+sin(1.0).*(1.0./2.0)-sin(x).*(1.0./2.0)+3.0./2.0

b=U(x);
plot(x,b)
f7=dsolve('Dy=(exp(x)-1)/(exp(x)+1)','y(1)=2','x')

f7 =

2*log(exp(x) + 1) - 2*log(exp(1) + 1) - x + 3

C=inline(f7)

C =

Inline function:
C(x) = -x-log(exp(1.0)+1.0).*2.0+log(exp(x)+1.0).*2.0+3.0

d=C(x);
p=C(x);
plot(x,p)
f8=dsolve('Dy=(exp(2x)-1)/(exp(2x)+3)','y(1)=2','x')
{#Error using
<a
href="matlab:matlab.internal.language.introspective.errorDocCallback('sym>convertEx
pression', 'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m', 1409)" style="font-
weight:bold">sym>convertExpression</a>
(<a href="matlab: opentoline('C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m',1409,0)">line 1409</a>)
Conversion to 'sym'
returned the MuPAD
error:
symbolic:kernel:UnexpectedToken|identifier#

Error in <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('sym>convertCh
ar', 'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m', 1324)" style="font-
weight:bold">sym>convertChar</a>
(<a href="matlab: opentoline('C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m',1324,0)">line 1324</a>)
s =
convertExpression(x);

Error in <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('sym>tomupad',
'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m', 1124)" style="font-
weight:bold">sym>tomupad</a>
(<a href="matlab: opentoline('C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m',1124,0)">line 1124</a>)
S =
convertChar(x);

Error in <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('sym',
'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m', 151)" style="font-
weight:bold">sym</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\MATLAB
Production Server\R2015a\toolbox\symbolic\symbolic\@sym\sym.m',151,0)">line
151</a>)
S.s =
tomupad(x);

Error in
<a
href="matlab:matlab.internal.language.introspective.errorDocCallback('dsolve>mupadD
solve', 'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m', 331)" style="font-
weight:bold">dsolve>mupadDsolve</a> (<a href="matlab: opentoline('C:\Program
Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m',331,0)">line
331</a>)
sys = [sys_sym
sym(sys_str)];

Error in <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('dsolve',
'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m', 193)" style="font-
weight:bold">dsolve</a> (<a href="matlab: opentoline('C:\Program
Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m',193,0)">line
193</a>)
sol = mupadDsolve(args,
options);
}#
f9=dsolve('Dy=(exp(2*x)-1)/(exp(2*x)+3)','y(1)=2','x')

f9 =

(2*log(exp(2*x) + 3))/3 - x/3 - (2*log(exp(2) + 3))/3 + 7/3

Y=inline(f9)

Y =

Inline function:
Y(x) = x.*(-1.0./3.0)+log(exp(x.*2.0)+3.0).*(2.0./3.0)-
log(exp(2.0)+3.0).*(2.0./3.0)+7.0./3.0

t=Y(x);
plot(x,t)
f10=dsolve('Dy=x^2+1/(x-1)','y(1)=2','x')
[#Warning: Explicit
solution could not be
found.]#
[#> In <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('dsolve',
'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m', 201)" style="font-
weight:bold">dsolve</a> (<a href="matlab: opentoline('C:\Program
Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m',201,0)">line 201</a>)]#

f10 =

[ empty sym ]

f10=dsolve('Dy=(x^2+1)/(x-1)','y(1)=2','x')
[#Warning: Explicit
solution could not be
found.]#
[#> In <a
href="matlab:matlab.internal.language.introspective.errorDocCallback('dsolve',
'C:\Program Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m', 201)" style="font-
weight:bold">dsolve</a> (<a href="matlab: opentoline('C:\Program
Files\MATLAB\MATLAB Production
Server\R2015a\toolbox\symbolic\symbolic\dsolve.m',201,0)">line 201</a>)]#

f10 =

[ empty sym ]

f10=dsolve('Dy=(x^2+2*x+2)/(x+1)','y(1)=2','x')

f10 =

x + log(x + 1) - log(2) + x^2/2 + 1/2

Q=inline(f10)

Q =

Inline function:
Q(x) = x+log(x+1.0)-log(2.0)+x.^2.*(1.0./2.0)+1.0./2.0

v=Q(x);
plot(x,v)
diary off

Vous aimerez peut-être aussi