Question

In: Computer Science

1) Write an algorithm (i.e. the series of steps) to find the solution to a second...

1) Write an algorithm (i.e. the series of steps) to find the solution to a second order non-homogenous ODE (with boundary conditions) using the method of undetermined coefficients. (Note: this algorithm should include at least 1 control structure).
2) Write an if statement in MATLAB that converts an overall final percentage mark grade (1-7).

Solutions

Expert Solution

Answer:

1) General approach to solve IInd order non-homogeneous ODE using the method of undetermined constants can be described in the following steps:

------------------------------------------------------

Let ODE be of the form:

ay''+by'+c = r(x)

where r(x) is finite linear combination of the form r(x) = r1(x) + r2(x) + --------------- + rn(x)

If ypi(x) is a solution to ay''+by'+c = ri(x) then

yp(x) = yp1(x) + yp2(x) + -----------------------+ ypn(x) is a solution to ay''+by'+c = r(x)

--------------------------------------------------------------

2) See the if statement below:

-------------------------------------------

if percentage >= 90
grade = 1;
elseif percentage >= 80 & percentage < 90
grade = 2;
elseif percentage >= 70 & percentage < 80
grade = 3;
elseif percentage >= 60 & percentage < 70
grade = 4;
elseif percentage >= 50 & percentage < 60
grade = 5;
elseif percentage >= 40 & percentage < 50
grade = 6;
else
grade = 7;
end

------------------------------------------


Related Solutions

Write an algorithm (i.e. the series of steps) to find the solution to a second order non-homogenous ODE (with boundary conditions) using the method of undetermined coefficients
Write an algorithm (i.e. the series of steps) to find the solution to a second order non-homogenous ODE (with boundary conditions) using the method of undetermined coefficients. (Note: this algorithm should include at least 1 control structure).
An algorithm is classically defined as a finite series of steps which solves a problem. What...
An algorithm is classically defined as a finite series of steps which solves a problem. What are some types of instructions which occur in everyday life which would qualify as an algorithm? What are some everyday types of instruction which would NOT qualify as an algorithm
find a power series solution (x-1)y''+y'=0
find a power series solution (x-1)y''+y'=0
1)Find the power series solution for the equation y'' − y = x 2)Find the power...
1)Find the power series solution for the equation y'' − y = x 2)Find the power series solution for the equation y'' + (sinx)y = x; y(0) = 0; y'(0) = 1 Provide the recurrence relation for the coefficients and derive at least 3 non-zero terms of the solution.
1) Write an algorithm to calculate the sum of the following series: Sum =x-x3/3! + x5/5!...
1) Write an algorithm to calculate the sum of the following series: Sum =x-x3/3! + x5/5! – x7/7! +……. Stop when the term<0.0001. 2) An internet service provider charges its subscribers per month as follows: Data usage (n), in gbs charges (NIS) 0.0<n<=1.0 250 1.0<n<=2.0 500 2.0<n<=5.0 1000 5.0<n<=10.0 1500 n>10 2000 Write a C program to read the usage(n) from a file and print the charges to be paid by the subscribers. Your program must include the function calculate...
Find a series solution ofy′′−xy′+ 2y= 0.
Find a series solution ofy′′−xy′+ 2y= 0.
1. What is A-Star (A*) Algorithm in Artificial Intelligence? 2. A* Algorithm Steps 3. Why is...
1. What is A-Star (A*) Algorithm in Artificial Intelligence? 2. A* Algorithm Steps 3. Why is A* Search Algorithm Preferred? 4. A* and Its Basic Concepts 5. What is a Heuristic Function? 6. Admissibility of the Heuristic Function 7. Consistency of the Heuristic Function 8. Find an Implementation in Java, C or Python just choose in which programming language you prefer only select one.
-Write a program in C++: • to find the sum of the series 1! /1+2! /2+3!...
-Write a program in C++: • to find the sum of the series 1! /1+2! /2+3! /3+4! /4+5! /5 using the function1, • to convert decimal number to binary number using the function2, • to check whether a number is a prime number or not using the function3, • to check whether two given strings are an anagram using the function4. important must do in (Multi-Filing) of c++
Intelligent Agents 1. What is A-Star (A*) Algorithm in Artificial Intelligence? 2. A* Algorithm Steps 3....
Intelligent Agents 1. What is A-Star (A*) Algorithm in Artificial Intelligence? 2. A* Algorithm Steps 3. Why is A* Search Algorithm Preferred? 4. A* and Its Basic Concepts 5. What is a Heuristic Function? 6. Admissibility of the Heuristic Function 7. Consistency of the Heuristic Function 8. Find an Implementation in Java, C or Python just choose in which programming language you prefer only select one.
solution using stack Reversing a word or a sentence: Write an algorithm that will display a...
solution using stack Reversing a word or a sentence: Write an algorithm that will display a given word in a reverse order. - e.g. "Data Structures" will be "serutcurtS ataD".
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT