Azzera filtri
Azzera filtri

matlab求解微分方程

17 visualizzazioni (ultimi 30 giorni)
敏君 杨
敏君 杨 il 6 Apr 2023
Risposto: Zuber il 11 Apr 2023
想求解下列微分方程,用dsolve得到的结果如下,好像没算出来,不太明白什么意思,该如何正确求解,向各位大神求助!十分感谢!
syms v(z) a g L b
eqn=(diff(v,z)+g/v+b*v==a/(z*v*sqrt(L^2+z^2)));
dsolve(eqn)
ans =
(exp(-2*b*z)*(C1 + 2*int(-exp(2*b*z)*(g - a/(z*(L^2 + z^2)^(1/2))), z, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)))^(1/2)
-(exp(-2*b*z)*(C1 + 2*int(-exp(2*b*z)*(g - a/(z*(L^2 + z^2)^(1/2))), z, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)))^(1/2)

Risposte (1)

Zuber
Zuber il 11 Apr 2023
Hi,
I understand that you want to solve the following differential equation,
where:
  • v(z) is an unknown function of ‘z’.
  • ‘g’, ‘L’, ‘b’ and ‘a’ are constants.
  • represents the derivative of v(z) with respect to ‘z’.
This is a first order differential equation which can be solved using ‘dsolve’ function and hence your approach is correct. For the above differential equation, following is the output:
(exp(-2*b*z)*(C1 + 2*int(-exp(2*b*z)*(g - a/(z*(L^2 + z^2)^(1/2))), z, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)))^(1/2)
-(exp(-2*b*z)*(C1 + 2*int(-exp(2*b*z)*(g - a/(z*(L^2 + z^2)^(1/2))), z, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)))^(1/2)
The output represents the ‘general solution’ of the differential equation which consists of:
  • The ‘int()’ term represents the indefinite integral of expression inside the bracket and evaluates to function of ‘z’ which depends on the parameters ‘a’, ‘g’, ‘L’ and ‘b’. ‘C1’ is the arbitrary constant.
  • ‘IgnoreSpecialCases’ when set to ‘true’ ignores the cases that require one or more parameters to be elements of a comparatively small set, such as a fixed finite set or a set of integers.
  • ‘IgnoreAnalyticConstraints’ set to ‘true’ implies that while solving the differential equation using a solver, some simplifications are applied to make the calculations more efficient. In other words, the solver may use mathematical identities that work only for certain values of the variables, but may not be true in general.
For more information on ‘dsolve’ function, please refer to the following documentation: https://www.mathworks.com/help/symbolic/dsolve.html
I hope this resolves your query

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!