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!

