# symbolic integration needed in the present code

조회 수: 1 (최근 30일)
MINATI PATRA 2022년 4월 26일
댓글: MINATI PATRA 2022년 4월 26일
syms h q x f(x) f0 f1(x) f2(x) f3(x)
f = f0 + f1*q + f2*q.^2 + f3*q.^3; Eq0 = diff(f,x) - diff(f0,x); Eq1 = diff(f,x) - f^2;
A = (1-q)*(Eq0) == h*q*Eq1; B = diff(A,q); C = subs(B,[q,f0],[0,1]);
D = int(C,x)
%%% D: f1 = h*x + Constant of integration; This answer should come when I run this code but ...

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

### 답변 (1개)

Paul 2022년 4월 26일
syms h q x f(x) f0 f1(x) f2(x) f3(x)
f = f0 + f1*q + f2*q.^2 + f3*q.^3;
Eq0 = diff(f,x) - diff(f0,x);
Eq1 = diff(f,x) - f^2;
A = (1-q)*(Eq0) == h*q*Eq1;
B = diff(A,q);
C = subs(B,[q,f0],[0,1])
C(x) =
As stated on its doc page, int() does not return a constant of integration in its result, so it has to be added explicitly:
syms C1
D = int(lhs(C),x) == int(rhs(C),x) + C1
D(x) =
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
MINATI PATRA 2022년 4월 26일
why am I not able to accept this answer?
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
How to resolve?
Thanks Paul

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

### 카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by