20210701

31 days 전, sean9892 작성

from sage.symbolic.integration.integral import definite_integral,indefinite_integral 
       
x = var('x') y = function('y')(x) C = var('C') 
       
indefinite_integral(x^2,x) #이런식으로 적분됨 
       
1/3*x^3
1/3*x^3
desolve(diff(y,x)==-2*exp(2*x)*sin(2*x)+2*y,y) 
       
(c + cos(2*x))*e^(2*x)
(c + cos(2*x))*e^(2*x)
f = (C+cos(2*x))*exp(2*x) solve(diff(diff(f,x),x)==-8*exp(2*x)*sin(2*x)+4*exp(2*x),C) 
       
[C == 1]
[C == 1]
fr=f.subs(C==1) 
       
solve(diff(fr,x)==0,x) 
       
[sin(2*x) == cos(2*x) + 1]
[sin(2*x) == cos(2*x) + 1]
# 0<x<pi에서의 sin(2*x) == cos(2*x) + 1의 근: x=pi/4, x=pi/2 # 극댓값은 max(fr(pi/4),fr(pi/2)) print("pi/2",diff(diff(fr,x),x).subs(x==pi/2),fr.subs(x==pi/2)) print("pi/4",diff(diff(fr,x),x).subs(x==pi/4),fr.subs(x==pi/4)) 
       
('pi/2', 4*e^pi, 0)
('pi/4', -4*e^(1/2*pi), e^(1/2*pi))
('pi/2', 4*e^pi, 0)
('pi/4', -4*e^(1/2*pi), e^(1/2*pi))