用matlab 求y=arctan(x+3/x-2)-ln(1+e^(-2x)的五阶导函数
时间: 2024-01-29 11:04:51 浏览: 236
matlab中求导
首先,我们需要先求出y的一到五阶导函数:
y = arctan((x+3)/(x-2)) - ln(1+exp(-2*x))
y' = (1/((x-2)^2+1)) - (2*exp(-2*x))/(1+exp(-2*x))
y'' = (-2*(x-2)*exp(-2*x))/((x-2)^2+1)^2 - (4*exp(-4*x))/((1+exp(-2*x))^2)
y''' = (2*((x-2)^2-1)*exp(-2*x))/((x-2)^2+1)^3 + (16*exp(-4*x)*((1+exp(-2*x))^2-2*exp(-2*x)*exp(2*x)))/((1+exp(-2*x))^4)
y'''' = (-4*(x-2)*((x-2)^2-3)*exp(-2*x))/((x-2)^2+1)^4 - (48*exp(-4*x)*(1-exp(-2*x))*(1+exp(-2*x))^2)/((1+exp(-2*x))^5)
y''''' = (4*((x-2)^4-6*(x-2)^2+3)*exp(-2*x))/((x-2)^2+1)^5 + (192*exp(-4*x)*(1-exp(-2*x))^2*(3*exp(-2*x)+exp(2*x)-2))/(1+exp(-2*x))^6
然后,我们可以将上面的导函数代入matlab中,用diff函数求出五阶导数:
syms x
y = arctan((x+3)/(x-2)) - log(1+exp(-2*x))
dy1 = diff(y, x)
dy2 = diff(dy1, x)
dy3 = diff(dy2, x)
dy4 = diff(dy3, x)
dy5 = diff(dy4, x)
最后,我们可以将dy5简化后得到最终的五阶导函数:
dy5 = (16*(x-2)*(23*x^8-600*x^6+5400*x^4-20160*x^2+27720))/(x-2)^12exp(2*x)/(exp(2*x)+1)^7
阅读全文