Hello,
I am working on a program to find the value of the current in a coil. This value satisfies the following equation:
y'=sin(2t)-[(e[sup]y[/sup]-1)/(e[sup]y[/sup]+1)]
which is of the form y'=f(t,y)
I know that in order to solve this I need to use the trapezoidal method to solve a differential equation, the formula is:
y[sub]n+1[/sub]=y[sub]n[/sub]+.5*h(f(t[sub]n[/sub],y[sub]n[/sub])+f(t[sub]n+1[/sub],y[sub]n+1[/sub]) where h=t[sub]n+1[/sub]-t[sub]n[/sub]
I have found examples of the standard trapezoidal method but I do not think they will help because of the difference in the formulas. Can anybody give me some guidance here?
I am working on a program to find the value of the current in a coil. This value satisfies the following equation:
y'=sin(2t)-[(e[sup]y[/sup]-1)/(e[sup]y[/sup]+1)]
which is of the form y'=f(t,y)
I know that in order to solve this I need to use the trapezoidal method to solve a differential equation, the formula is:
y[sub]n+1[/sub]=y[sub]n[/sub]+.5*h(f(t[sub]n[/sub],y[sub]n[/sub])+f(t[sub]n+1[/sub],y[sub]n+1[/sub]) where h=t[sub]n+1[/sub]-t[sub]n[/sub]
I have found examples of the standard trapezoidal method but I do not think they will help because of the difference in the formulas. Can anybody give me some guidance here?