# week5

## 1539 days ago by wldnd1217

#1 var('a,b,x,y') y=function('y',x) de=diff(y,x)==sqrt(x^2+a^2) desolve(de,[y,x])
 1/2*a^2*arcsinh(x/sqrt(a^2)) + 1/2*sqrt(a^2 + x^2)*x + c 1/2*a^2*arcsinh(x/sqrt(a^2)) + 1/2*sqrt(a^2 + x^2)*x + c
#2 y=function('y',x) de=diff(y,x)==csc(x)*cot(x) desolve(de,[y,x],ics=[pi/2,3])
 (4*sin(x) - 1)/sin(x) (4*sin(x) - 1)/sin(x)
#3 y=function('y',x) de=diff(y,x)==(x+e^x)/(y-e^(-y)) desolve(de,[y,x])
 1/2*(e^y(x)*y(x)^2 + 2)*e^(-y(x)) == 1/2*x^2 + c + e^x 1/2*(e^y(x)*y(x)^2 + 2)*e^(-y(x)) == 1/2*x^2 + c + e^x
#4 y=function('y',x) de=diff(y,x)==arctan(x)/(y^2*(1+x^2)) desolve(de,[y,x],ics=[0,0])
 1/3*y(x)^3 == 1/2*arctan(x)^2 1/3*y(x)^3 == 1/2*arctan(x)^2
y=function('y',x) de=y^2*(1+x^2)*diff(y)-arctan(x)*diff(x)==0 desolve(de,[y,x],ics=[0,0])
 1/3*y(x)^3 == 1/2*arctan(x)^2 1/3*y(x)^3 == 1/2*arctan(x)^2
#5 y=function('y',x) de=(3*x-2*y+5)*diff(y)+(6*x-4*y-6)*diff(x)==0 desolve(de,[y,x])
 Traceback (click to the left of this block for traceback) ... NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True. Traceback (most recent call last): File "", line 1, in File "_sage_input_21.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("IzUKeT1mdW5jdGlvbigneScseCkKZGU9KDMqeC0yKnkrNSkqZGlmZih5KSsoNip4LTQqeS02KSpkaWZmKHgpPT0wCmRlc29sdmUoZGUsW3kseF0p"),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpCfoLYU/___code___.py", line 5, in exec compile(u'desolve(de,[y,x]) File "", line 1, in File "/root/sage-5.8/local/lib/python2.7/site-packages/sage/calculus/desolvers.py", line 447, in desolve raise NotImplementedError("Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.") NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.
#6 y=function('y',x) de=(3*x +y -10)*diff(y) +(x +3*y -6)*diff(x)==0 desolve(de,[y,x],ics=[3,1])
 (3*x - 10)*y(x) + 1/2*x^2 + 1/2*y(x)^2 - 6*x == -14 (3*x - 10)*y(x) + 1/2*x^2 + 1/2*y(x)^2 - 6*x == -14
#7 x,y=var('x,y') M=cos(x+y) N=3*y^2+2*y+cos(x+y) bool(diff(M,y)==diff(N,x))
 True True
y=function('y',x) desolve(cos(x+y)*diff(x)+(3*y^2+2*y+cos(x+y))*diff(y)==0,y)
 y(x)^3 + y(x)^2 + sin(x + y(x)) == c y(x)^3 + y(x)^2 + sin(x + y(x)) == c
#8 x,y=var('x,y') M=cos(x)-2*x*y N=e^y-x^2 bool(diff(M,y)==diff(N,x))
 True True
y=function('y',x) desolve((cos(x)-2*x*y)*diff(x)+(e^y-x^2)*diff(y),y,ics=[0,4])
 -x^2*y(x) + e^y(x) + sin(x) == e^4 -x^2*y(x) + e^y(x) + sin(x) == e^4
#9 x,y=var('x,y') M=e^(x+y)+y*e^y N=x*e^y-1 bool(diff(M,y)==diff(N,x))
 False False
x,y=var('x,y') M=e^(x+y)+y*e^y N=x*e^y-1 u = (diff(N, x)-diff(M, y))/M print u print exp(-integral(u, y))
 -1 e^y -1 e^y
y=function('y',x) de=(e^x+y)*diff(x)+(x-e^(-y))*diff(y)==0 desolve(de,[y,x])
 ((x*y(x) + e^x)*e^y(x) + 1)*e^(-y(x)) == c ((x*y(x) + e^x)*e^y(x) + 1)*e^(-y(x)) == c
#10 x,y=var('x,y') M=2*cos(y^2) N=x*y*sin(y^2) bool(diff(M,y)==diff(N,x))
 False False
x,y=var('x,y') M=2*cos(y^2) N=x*y*sin(y^2) u = (diff(N, x)-diff(M, y))/N print u print exp(-integral(u, x))
 5/x e^(-5*log(x)) 5/x e^(-5*log(x))
y=function('y',x) de=2*cos(y^2)/x^5+x*y*sin(y^2)/x^5==0 desolve(de,[y,x],ics=[2,0])
 Traceback (click to the left of this block for traceback) ... NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True. Traceback (most recent call last): File "", line 1, in File "_sage_input_57.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eT1mdW5jdGlvbigneScseCkKZGU9Mipjb3MoeV4yKS94XjUreCp5KnNpbih5XjIpL3heNT09MApkZXNvbHZlKGRlLFt5LHhdLGljcz1bMiwwXSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmp0ZgZAN/___code___.py", line 5, in exec compile(u'desolve(de,[y,x],ics=[_sage_const_2 ,_sage_const_0 ]) File "", line 1, in File "/root/sage-5.8/local/lib/python2.7/site-packages/sage/calculus/desolvers.py", line 447, in desolve raise NotImplementedError("Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.") NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.
#11 y=function('y',x) de=diff(y)-y-e^(2*x)*diff(x)==0 desolve(de,[y,x])
 (c + e^x)*e^x (c + e^x)*e^x
#12 y=function('y',x) de=diff(y)+y*tan(x)-sin(2*x)*diff(x)==0 desolve(de,[y,x],ics=[0,1])
 -(2*cos(x) - 3)/sec(x) -(2*cos(x) - 3)/sec(x)
#13 y=function('y',x) de=diff(y)+1/x*y-x*y^2*diff(x)==0 desolve(de,[y,x])
 1/((c - x)*x) 1/((c - x)*x)
#14 y=function('y',x) de=diff(y)+y*diff(x)-y^2*(cos(x)-sin(x))*diff(x)==0 desolve(de,[y,x],ics=[1,1])
 e/((sin(1) + 1)*e^x - e*sin(x)) e/((sin(1) + 1)*e^x - e*sin(x))
#15 y=function('y',x) de=sin(y)*diff(y,x)==cos(y)*(1-x*cos(y)) desolve(de,[y,x])
 Traceback (click to the left of this block for traceback) ... NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True. Traceback (most recent call last): File "", line 1, in File "_sage_input_7.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("IzE1Cnk9ZnVuY3Rpb24oJ3knLHgpCmRlPXNpbih5KSpkaWZmKHkpPT1jb3MoeSkqKDEteCpjb3MoeSkpKmRpZmYoeCkKZGVzb2x2ZShkZSxbeSx4XSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpxfdKZC/___code___.py", line 5, in exec compile(u'desolve(de,[y,x]) File "", line 1, in File "/root/sage-5.8/local/lib/python2.7/site-packages/sage/calculus/desolvers.py", line 447, in desolve raise NotImplementedError("Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.") NotImplementedError: Maxima was unable to solve this ODE. Consider to set option contrib_ode to True.
#16 y=function('y',x) de=diff(y,x)+y*sin(x)==y^2*sin(x) desolve(de,[y,x])
 log(y(x) - 1) - log(y(x)) == c - cos(x) log(y(x) - 1) - log(y(x)) == c - cos(x)
#17 f(x)=x/(x-1)-1/ln(x) limit(f(x),x=1)
 1/2 1/2
#18 f(x)=(1-sin(x))^(1/x) limit(f(x),x=0)
 e^(-1) e^(-1)
#19 f(x)=(1-1/x)^sqrt(x) limit(f(x),x=+infinity)
 1 1