필터 지우기
필터 지우기

How can i make a code to find y of y''=y*y' ?

조회 수: 1 (최근 30일)
kyu hong lee
kyu hong lee 2016년 6월 10일
편집: Roger Stafford 2016년 6월 11일
(sorry about my english skill)
i want to know how can i make a ode code.
if i have y'=2y then i can make a code like
[T,Y] = ode45(@(t,y) 2*y,[0 1],1); plot(T,Y);
but if i have y''=y*y' , i can't make a code
help me (T_T)

채택된 답변

Roger Stafford
Roger Stafford 2016년 6월 10일
편집: Roger Stafford 2016년 6월 11일
To solve your equation numerically using one of the ode functions, you set it up as two simultaneous differential equations:
dy(1) = y(2)
dy(2) = y(1)*y(2)
See:
http://www.mathworks.com/help/matlab/ref/ode45.html
for some examples of this.
However, it should be noted that the ordinary methods of calculus can be used to solve this particular differential equation. Its solutions are:
y = 2*a*tan(a*t+b)
y = -2/(t+b)
y = -2*a*coth(a*t+b)
y = b
y = -2*a*tanh(a*t+b)
where a and b are arbitrary constants. (Corrected twice)
  댓글 수: 1
Roger Stafford
Roger Stafford 2016년 6월 10일
편집: Roger Stafford 2016년 6월 11일
I have added two more solution formulas involving the hyperbolic cotangent function and a reciprocal formula.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by