-
Improving Euler. 1.Function.
function[x,y]=eulerpro(fun,x0,xfinal,y0,n)
if nargin<5
n=50;end
h=(xfinal-x0)/n;% step.
x(1)=x0;y(1)=y0;
for i=1:n
x(i+1)=x(i)+h;
y1=y(i)+h*feval(fun,x(i),y(i));
y2=y(i)+h*feval(fun,x(i+1),y1);
y(i+1)=(y1+y2)/2;
endend
2.Function. function f=doty(x,y)f=cos(x*y);
end3.Main function calls.
x,y]=eulerpro('doty',0,1,1,10)
-
<>1.The answer to this question of often differential calculus is shown in the figure above.
2.The problem of constant differentiation, the solution of the redline problem, what you did earlier was right.
3.The solution to the problem of constant differentiation and the redline problem, the method to do it later is: shout the first line in my diagram, simplify it first, and then integrate both sides.
4.The solution of the red line problem of constant differential calculus, the second line on my diagram, when integrating, the end of the left Zheng void line can be integrated by the method of differential differentiation, that is, the commutation method.
See above for the detailed steps and instructions for solving the redline problem for finding the normal differential.
-
1 This graph is actually an estimation method used when it is difficult to solve the equation directly. Each arrow indicates that if the phase diagram of the equation solution passes through the starting point of the arrow, its derivative, magnitude and direction at that point will be shown by the arrow. For example, an arrow with a starting point of (x1,x2) happens to represent a vector (x2,sinx1).
By connecting these arrows, it is possible to estimate some of the properties of the solution (curve).
If a concrete curve f(x1,x2)=0 satisfies the original differential equation, then it already represents a set of solutions to the original equation.
Judging from the annotations in the figure, the original equation is a single pendulum equation, which is not easy to solve directly, so this kind of graph is used for estimation.
2 (I'm not sure about this) The ball pendulum is roughly a rod with one end fixed on a freely rotating shaft and a small ball at the other end. See.
-
This diagram is called a direction field, and there are not only arrows on it, but also dots, which are called line pixels, which represent the derivatives of where the dots are located. Connecting these points in the direction of the arrow becomes the integral curve, the original function you need to solve. In most cases, the solution of the differential equation can be solved by using the method of making equipotential lines.
-
This is a second-order variable coefficient differential equation. by the title.
It can be found that y1=sin(x) x is the special solution of the equation.
After doing the transformation y=y1* v(t)dt, the equation can be reduced to a first-order differential equation, and the general solution of the equation is y=(c1*sin(x)-c2*cos(x)) x
-
Because y1, y2, y3 are linearly independent, so: y1-y2, y1-y3 are linearly independent and because:
Functions y1, y2, y3 are all solutions of the second-order non-homogeneous linear equation y + p(x)y + q(x)y=f(x), so c1(y1-y2)+c2(y1-y3) is the general solution of y + p(x)y +q(x)y=0, and adding a special solution is the general solution of the non-homogeneous equation.
-
The characteristic equation r 2 + 2r + 5 = 0
r+1)^2=-4
r=-1±2i
So homogeneous equation x''+2x'The general solution of +5x=0 is x1=e (-t)*(c1*cos2t+c2*sin2t).
Seek x first''+2x'+5x=4e (-t).
Let the special solution x2*=me (-t) be substituted into the above equation.
me^(-t)-2me^(-t)+5me^(-t)=4e^(-t)
m=1, so the special solution x2*=e (-t).
Find x again''+2x'+5x=17sin2t.
Let the special solution x3*=acos2t+bsin2t be substituted into the above equation.
a+4b=0,a-4b=17
a=17/2,b=-17/8
So the special solution x3 * = (17 8) * (4cos2t-sin2t).
To sum up, the general solution of the original equation x=x1+x2*+x3*
e^(-t)*(c1*cos2t+c2*sin2t)+e^(-t)+(17/8)*(4cos2t-sin2t)
e^(-t)*(c1*cos2t+c2*sin2t+1)+(17/8)*(4cos2t-sin2t)
where c1, c2 are arbitrary constants.
-
Let the special solution of the original equation be x=ae (-t)+bcos(2t)+csin(2t) and substitute it into the original equation to get 4ae (-t) + (b+4c)cos(2t)+(c-4b)sin(2t)=4e (-t)+17sin(2t).
-
k1+k2yy)y =k3yy, y =k3yy (k1+k2y) integrals on both sides. Divide it into a micro equation and see if you can find it.
There are trees and high fingers to teach
1. The value range of a is greater than 0 degrees, less than or equal to 45 degrees; (using the triangle corner relation formula). >>>More
1) Because they are two alloys of the same weight, they can be regarded as 1, that is to say, the copper of the first block is 2 5, the zinc is 3 5, the copper of the second block is 1 4, and the zinc is 3 4, and the sum of copper is 13 20 and zinc is 27 20, so the ratio of copper to zinc in the new alloy is 13 27. >>>More
Adverbial, where the verb infinitive phrase is used to indicate future behavior, thus meets the condition of the purpose adverbial, and if it is a definite, this expression should be used: >>>More
First, it's a matter of time. To enter the command 10 seconds before the start. >>>More