Question
Write a Python program that implements Lanchester's Law for aimed fire: Where x and y are the troop levels of opposing sides, a (alpha) and
- Write a Python program that implements Lanchester's Law for aimed fire:
Where x and y are the troop levels of opposing sides, a (alpha) and b (beta) are their respective lethality coefficients. The program shall read inputs for the troop starting levels, x0 and y0, and the lethality coefficients a and b. It shall output a time history of the remaining troops for each side. This will require a numerical integration of the differential equations over time. A recommended simplest solution is to use Eulers method, but it is not required. An example test case with expected results for x0 = 1000, y0 = 800, = .8, and = .9 is shown in Figure 3. Supplementary information can be found in Alan Washburn, Lanchester Systems, 2000. This test example is described in section 2.2 on p. 7.
Figure 3: Expected Results for x0 = 1000, y0 = 800, = .8, and = .9
please create the graph also in python
1200 1000 2 800 x-type y-type 2 600 50300 A) 400 200 0 0.5 1.5 2 time Figure 3. A square law battleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started