differentiated system of equations with input at one of the variables

1 回表示 (過去 30 日間)
fima v
fima v 2017 年 6 月 1 日
コメント済み: fima v 2017 年 6 月 1 日
Hello, i have an expression which i need to perform derivatives on it so every derivative will be stored as an expression , and then i need to solve a system of equations where every expression equals zero, with x=1 as an input.
i have tried to write down a code,pseudo matlab code to demonstrate. how can i accomplish this solving ?
maybe we could use
******************
syms y(t) a
eqn = diff(y,t,2) == a*y;
ySol(t) = dsolve(eqn)
***********************
Thanks
sym a,b,c,d,x
y=a*x^3+b*x^2+c*x+d*sin(x)
y_1=diff(y,x)
y_2=diff(y,x,2)
y_3=diff(y,x,3)
x=1
sol = solve(y_1,y_2,y_3)
  1 件のコメント
fima v
fima v 2017 年 6 月 1 日
編集済み: fima v 2017 年 6 月 1 日
i have tried the following but its not working
**********
syms a b c d x
f_1=a*x^3+b*x^2+c*x+d;
f_2=3*a*x^2+2*b*x+c;
f_3=6*a*x+2*b;
f_4=6*a;
eqns=[f_1==0,f_2==0,f_3==0,f_4==0,x==1];
vars=[a b c d ];
[sol_a,sol_b,sol_c,sol_d]=solve(eqns,vars);

サインインしてコメントする。

採用された回答

Torsten
Torsten 2017 年 6 月 1 日
syms a b c d
x=1;
f_1=a*x^3+b*x^2+c*x+d;
f_2=3*a*x^2+2*b*x+c;
f_3=6*a*x+2*b;
f_4=6*a;
eqns=[f_1==0,f_2==0,f_3==0,f_4==0];
vars=[a b c d ];
[sol_a,sol_b,sol_c,sol_d]=solve(eqns,vars);
Best wishes
Torsten.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by