求帮忙解微分方程,用matlab解应该怎么输入?f是常数

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 04:47:30

求帮忙解微分方程,用matlab解应该怎么输入?f是常数
求帮忙解微分方程,用matlab解应该怎么输入?
f是常数

求帮忙解微分方程,用matlab解应该怎么输入?f是常数
用matlab的dsolve命令求解失败,结果如下:
>> syms f;a=dsolve('Dx=(sqrt((f-x)^2+y^2)-f+x)/y')
Warning:Explicit solution could not be found.
> In dsolve at 120
a =
[ empty sym ]
我把f用数值代替,比如1,结果如下:
>> a=dsolve('Dx=(sqrt((1-x)^2+y^2)-1+x)/y')
Warning:Explicit solution could not be found.
> In dsolve at 120
a =
[ empty sym ]
warning的意思应该是matlab没能找到符号解.
我又尝试了一下将y换成t,因为matlab默认的求导是对t求导(不过按理说对y求导也是没有影响的),结果更诡异:
>> syms f;a=dsolve('Dx=(sqrt((f-x)^2+t^2)-f+x)/t')
a =
f - i*t
f
f + i*t
solve(t*(exp(C29 + log(f - x)) + 1)^(1/2) - (f^2 - 2*f*x + t^2 + x^2)^(1/2) - x = -f,x)
solve(- x - (f^2 - 2*f*x + t^2 + x^2)^(1/2) - t*(exp(C29 + log(f - x)) + 1)^(1/2) = -f,x)
warning倒是没了,但是出来的结果带有solve函数,显然是matlab没能解出来,于是显示了一些中间步骤.
这个方程是个比较简单的一阶微分方程,按理matlab应该很好解,你再看看有没写错