I have a differential equation that looks like this:
dT/dx = (1+alpha*M1)*(T^2)*S(x) - 4*(2+gamma*M2)*x*T
I want to differentiate this equation let's say over **alpha**. However, T depends on **alpha**. How can I get a differential equation that *includes* the derivative **dT/da** so I can solve for it (using ode45 or something)?
**Note:** I can't differentiate the equation by hand as I will need to do this for the Ys as well, where I don't have an easy analytical function.
My code so far:
syms L alpha gamma Y2 Y3 Y4 Y5 Y6 x T X
M1 = 0;
M2 = 7;
Y1 = 1 + M2 / 10;
Y7 = 3 + M1 / 10;
xcp = [0 0.1*L 0.25*L 0.5*L 0.6*L 0.75*L L];
ycp = [Y1 Y2 Y3 Y4 Y5 Y6 Y7];
T0 = 5 + 1/L - 25/(L^2);
S = bezier_syms();
ode = diff(T,x) == (1+alphaM1)*(T^2)*S(L,x,Y2,Y3,Y4,Y5,Y6) - 4*(2 + gamma*M2)xT;