Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

F.M function [ value ] = F( t, y ) %The function \" F \" % This function is used

ID: 3787282 • Letter: F

Question

F.M

function [ value ] = F( t, y )
%The function " F "
% This function is used to define our differential equation

value = y * (2-y);


end

ExampleSlopeField.m

% We clear all variables which may have been defined
clear

% These variables define the minimum and maximum values
% for "T" in the slope field.
T_min = -4;
T_max = 4;

% These variables define the minimum and maximum values
% for "Y" in the slope field.
Y_min = -4;
Y_max = 4;
% These variables define the spacings between the slope lines
% in the T and Y directions.
T_step = 0.5;
Y_step = 0.5;


% This creates a new figure window and plots the slope field
figure
SlopeField( T_min, T_max, T_step, Y_min, Y_max, Y_step )

For the following differential equations y'(t) = cos(y) + sin(t) y'(t) = y * (2 - y) Modify the function F.m in MATLAB to match the given differential equation above. Run the file ExampleSlopeField.m to generate a slope field of the differential equation, and print out your figure. Constrain the dimensions of your plot to be -4 lessthanorequalto y lessthanorequalto 4 and -4 lessthanorequalto t lessthanorequalto 4 and the spacing between the slope line's should be 0.5. On your printed out slope field, sketch the solution of the differential equation forward ill time .starling at the following points: (t_1, y_1) = (-2, -1.5) (t_2, y_2) = (-1, -0.5) (t_3, y_3) = (0, 4) For each of the initial points above, continue the solution curve backwards in time to see where the initial point originated from.

Explanation / Answer

import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.Stack;

public category TSPNearestNeighbour
non-public int numberOfNodes;
non-public Stack<Integer> stack;

public TSPNearestNeighbour()
  

public void tsp(int adjacencyMatrix[][])
component, dst = 0, i;
int min = number.MAX_VALUE;
Boolean minFlag = false;
System.out.print(1 + " ");

whereas (!stack.isEmpty())
part = stack.peek();
i = 1;
min = number.MAX_VALUE;
whereas (i <= numberOfNodes)
one && visited[i] == 0)
  
}
i++;
}
if (minFlag)
  
}
for (int i = 1; i <= number_of_nodes; i++)
one && adjacency_matrix[j][i] == 0)
  
}
}
System.out.println("the citys area unit visited as follows");
TSPNearestNeighbour tspNearestNeighbour = new TSPNearestNeighbour();
tspNearestNeighbour.tsp(adjacency_matrix);
} catch (InputMismatchException inputMismatch)