Code for solving first-order ode with symbolic initial condition
古いコメントを表示
I am very new to MATLAB, and writing MATLAB code for solving the problem #20 of Section 1.1 in Kreyszig (2011).
Problem #20 is as follows:
Exponentialdecay. Subsonicflight. The efficiency of the engines of subsonic airplanes depends on air pressure and is usually maximum near 35,000 ft. Find the air pressure
at this height. Physical information. The rate of change
is proportional to the pressure. At 18,000 ft it is half its value
at sea level.
I wrote the following code for solving the problem, but get a wrong answer.
clear
syms y(t) k
ode = diff(y) == k*y
cond = y(18000) == y(0)/2
ySol(t) = dsolve(ode, cond)
I got a trivial solution.
How to get a non-trivial solution of this problem?
If I solve the problem with pencil and eraser, the non-trivial solution is
.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Equation Solving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

