From a13603d2ffde3a1e6b1080a6951014d4588ab972 Mon Sep 17 00:00:00 2001 From: "Peter B. Johnson" Date: Wed, 23 Sep 2026 22:45:19 +0100 Subject: [PATCH 1/3] implement: Apply the stray-minus check to OCR markdown only (t47) --- docs/plan.md | 4 +++- in2lambda_agent/routes.py | 24 ++++++++++++++++-------- tests/fixtures/tex-sheet.tex | 8 ++++++++ tests/test_routes.py | 30 ++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/docs/plan.md b/docs/plan.md index 0ee4cfe..49a997a 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -88,7 +88,9 @@ a word Mathpix misread passes every tier. The comparison with an exported set, o reader, detects it. An OCR check is separate work. The one misread the route detects is a separator line read as a minus sign: `stray_minus` flags a field whose display maths begins or ends with a minus sign, and a field holding a minus sign on a line of its own -beside a display maths. +beside a display maths. The check applies to a document Mathpix converted and not to one +pandoc converted, because pandoc reads no separator line and such a minus sign is the +author's own. ## Response areas diff --git a/in2lambda_agent/routes.py b/in2lambda_agent/routes.py index 3fc9076..53aad25 100644 --- a/in2lambda_agent/routes.py +++ b/in2lambda_agent/routes.py @@ -8,8 +8,9 @@ passage of the source, never its own words (`adjudicate`); what neither settles is a flag for a person (`reconcile`). A field only one route filled is not a disagreement: the text of the route that filled it is taken, and no call is made. A minus sign inside or beside a -display maths, which Mathpix reads from a separator line, is flagged too (`stray_minus`). -`to_set` and `build` write the result with in2lambda. +display maths, which Mathpix reads from a separator line, is flagged too (`stray_minus`), +in a document Mathpix converted and not in one pandoc converted. `to_set` and `build` +write the result with in2lambda. `convert` converts one document. `convert_folder` converts a folder of them: it pairs each sheet with its solutions document, writes one filter from the first pair, and reports for @@ -143,7 +144,9 @@ def stray_minus(reply: Reply_) -> list[str]: """The fields holding a minus sign Mathpix read from a separator line. A display maths begins or ends with the minus sign, or the minus sign stands on a - line of its own beside the block. + line of its own beside the block. `convert` asks this of OCR markdown only, because + the same minus sign in a tex or docx document is the author's own; the function reads + a reply and asks nothing about the document the reply came from. """ found = [] for key, text in fields(reply).items(): @@ -534,10 +537,10 @@ def said(stage: str, message: str) -> None: if on_stage is not None: on_stage(stage, message) - read = [f"{Path(d).name}: {_read_as(d, cache_dir)}" for d in (document, solutions) if d is not None] + read = [(Path(d).name, _read_as(d, cache_dir)) for d in (document, solutions) if d is not None] markdown, images = markdown_of(document, cache_dir, settings) solutions_md = markdown_of(solutions, cache_dir, settings)[0] if solutions else None - said("ocr", "; ".join(read)) + said("ocr", "; ".join(f"{name}: {how}" for name, how in read)) source = markdown + ("\n" + solutions_md if solutions_md else "") if route_a is None: route_a, usage = direct(markdown, solutions_md, backend) @@ -571,9 +574,14 @@ def said(stage: str, message: str) -> None: reconciled.agreed, reconciled.defaulted, reconciled.adjudicated, ) said("route B", "ran") - for k in stray_minus(reply): - if not any(f.field == k for f in flags): - flags.append(Flag(k, fields(reply)[k], "", STRAY_MINUS)) + # The stray minus sign is Mathpix reading a printed separator line. Pandoc reads no + # such line, so a minus sign at the edge of a display maths of a tex or docx document + # is the author's own, and the check runs only where a document was not converted by + # pandoc. + if any(how != "pandoc" for _, how in read): + for k in stray_minus(reply): + if not any(f.field == k for f in flags): + flags.append(Flag(k, fields(reply)[k], "", STRAY_MINUS)) result = Converted( set=to_set(reply, name=name, directory=images), zip_path=None, flags=flags, reply=reply, route_a=route_a, tokens=tokens, diff --git a/tests/fixtures/tex-sheet.tex b/tests/fixtures/tex-sheet.tex index 3c5d779..8c761c6 100644 --- a/tests/fixtures/tex-sheet.tex +++ b/tests/fixtures/tex-sheet.tex @@ -17,6 +17,14 @@ \section*{Problem Sheet 1: Kinematics} \item Two ships sail from the same point. Are they on a crash course? If not, find their distance of closest approach. +% The display maths begins with the author's own minus sign, which the +% stray-minus check must not flag in a document pandoc converted. +\item The potential of a dipole on its axis is + \[ + -\frac{p}{4 \pi \varepsilon_0 z^2}. + \] + Find the field at a distance $z$. + \end{enumerate} \end{document} diff --git a/tests/test_routes.py b/tests/test_routes.py index c6010db..600fa6d 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -144,6 +144,36 @@ def test_convert_reports_the_stray_minus_as_a_flag(tmp_path): assert result.route_a == REPLY +@pytest.mark.skipif(shutil.which("pandoc") is None, reason="pandoc") +def test_a_minus_at_the_edge_of_a_maths_in_a_tex_document_is_the_authors(tmp_path): + # The tex fixture's third question opens a display maths with a minus sign the + # author wrote. Pandoc reads no separator line, so convert makes no flag of it, + # although the pattern names the field. + reply = [ + { + "title": "", + "main_text": "The potential of a dipole on its axis is", + "parts": [ + { + "content": "Find the field at a distance $z$.", + "options": [], + "answer": "", + "worked_solution": "$$-\\frac{p}{4 \\pi \\varepsilon_0 z^2}.$$", + } + ], + } + ] + assert routes.stray_minus(reply) == ["q1.p1.worked_solution"] + + result = routes.convert( + Path(__file__).parent / "fixtures" / "tex-sheet.tex", + out_dir=tmp_path / "out", + backend=FakeBackend(json.dumps(reply)), + settings=Settings(), + ) + assert result.flags == [] + + def test_a_reply_given_to_convert_is_route_as_and_no_call_is_made(tmp_path): # What a targets run hands back from the reply it saved: the same reading of # the document, so that two runs compare the same set with the export. From 909367e0831e462935f98bc6844ae1be037ef325 Mon Sep 17 00:00:00 2001 From: "Peter B. Johnson" Date: Wed, 23 Sep 2026 23:03:06 +0100 Subject: [PATCH 2/3] implement: Apply the stray-minus check to OCR markdown only (t47) --- .../CW2/flags.json | 8 ++++++++ out/t47/ME2_Fluids_introduction/flags.json | 14 ++++++++++++++ out/targets-t47.txt | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json create mode 100644 out/t47/ME2_Fluids_introduction/flags.json diff --git a/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json b/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json new file mode 100644 index 0000000..3a98623 --- /dev/null +++ b/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json @@ -0,0 +1,8 @@ +[ + { + "field": "q1.p3.answer", + "a": "$$a=\\frac{1}{6}$$$$b = \\frac{-2}{9}$$$$c = \\frac{19}{27}$$", + "b": "$$a=\\frac{1}{6}$$$$b = \\frac{-2}{9}$$$$c = \\frac{19}{27}$$\\*\\*\\*", + "reason": "\"\\*\\*\\*\" before \"1. \"" + } +] \ No newline at end of file diff --git a/out/t47/ME2_Fluids_introduction/flags.json b/out/t47/ME2_Fluids_introduction/flags.json new file mode 100644 index 0000000..1474e7c --- /dev/null +++ b/out/t47/ME2_Fluids_introduction/flags.json @@ -0,0 +1,14 @@ +[ + { + "field": "q2.p1.worked_solution", + "a": "From mass conservation:\n\n$$\n-\\dot{m}_{a d}=\\dot{m}_{a b}+\\dot{m}_{b c}-\n$$\n\nThis becomes:\n\n$$\n-\\rho W \\int_{0}^{\\delta} U_{0} \\mathrm{~d} y=\\dot{m}_{a b}+\\rho W \\int_{0}^{\\delta} u(y) \\mathrm{d} y-\n$$\n\nSince we know that $u(y)$ is linear, we can express it in terms of $y$ and $U_{0}$ :\n\n$$\nu(y)=U_{0} \\frac{y}{\\delta},\n$$\n\nTherefore:\n\n$$\n\\begin{aligned}\n\\dot{m}_{a b} & =\\rho W U_{0}\\left(\\int_{0}^{\\delta} 1-\\frac{y}{\\delta} \\mathrm{~d} y\\right) \\\\\n\\dot{m}_{a b} & =\\rho W U_{0} \\frac{\\delta}{2} \\\\\n\\dot{m}_{a b} & =(800)(1)(3) \\frac{25 \\times 10^{-3}}{2} . \\\\\n& \\dot{m}=30 \\mathrm{~kg} / \\mathrm{s}\n\\end{aligned}\n$$", + "b": "", + "reason": "a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one" + }, + { + "field": "q3.p1.worked_solution", + "a": "The mass flow rate entering the control volume is\n\n$$\n\\dot{m}_{\\mathrm{in}}=\\rho U A_{\\mathrm{disk}}=\\rho U \\pi R^{2}\n$$\n\n- \n\n(since the velocity is uniform). The mass exiting the control volume on the left (the wake) is:\n-\n\n$$\n\\dot{m}_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R) \\mathrm{d} r\n$$\n\nHence, the mass flow rate leaving the control volume through the side $\\left(\\dot{m}_{\\text {side }}\\right)$ is:\n\n$$\n\\begin{aligned}\n\\dot{m}_{\\text {side }} & =\\dot{m}_{\\text {in }}-\\dot{m}_{\\text {wake }} \\\\\n& =\\rho U \\pi R^{2}-2 \\rho U \\pi \\int_{r=0}^{r=R} \\frac{r^{2}}{R} \\mathrm{~d} r \\\\\n& =\\rho U \\pi R^{2}-2 \\rho U \\pi\\left[\\frac{1}{3} \\frac{r^{3}}{R}\\right]_{r=0}^{r=R} \\\\\n& =\\rho U \\pi R^{2}-\\frac{2}{3} \\rho U \\pi R^{2} \\\\\n& =\\frac{1}{3} \\rho U \\pi R^{2}\n\\end{aligned}\n$$\n\nForce-momentum equation (FME):\n\nThe momentum flowrate entering the control volume is $M_{\\text {in }}=\\dot{m}_{\\text {in }} U$. The momentum flowrate exiting the control volume on the left (the wake) is\n-\n\n$$\nM_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r\n$$\n\n- \n\nThe mass leaving the control volume by the side is also contributing to the removal of momentum, $M_{\\text {side }}=\\dot{m}_{\\text {side }} U$. Hence, the momentum leaving the control volume is $M_{\\text {out }}=M_{\\text {wake }}+M_{\\text {side }}$.\n\nThe FME reads:\n-\n\n$$\nM_{\\text {out }}-M_{\\text {in }}=-F+F_{p},\n$$\n\n- \n\nwhere $F_{p}$ represents pressure forces. However, we assume the pressure to be unaffected by the presence of the submarine, which leaves the hydrostatic pressure force. Since the hydrostatic pressure has the same linear profile on both sides of the control volume (front and wake), it contributes nothing to the horizontal force. Hence:\n-\n\n$$\n\\begin{aligned}\n-F & =2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r+\\dot{m}_{\\text {side }} U-\\dot{m}_{\\text {in }} U \\\\\n& =2 \\rho U^{2} \\pi \\int_{r=0}^{r=R}\\left(r^{3} / R^{2}\\right) \\mathrm{d} r+\\frac{1}{3} \\rho U^{2} \\pi R^{2}-\\rho U^{2} \\pi R^{2} \\\\\n& =2 \\rho U^{2} \\pi\\left[\\frac{1}{4} \\frac{r^{4}}{R^{2}}\\right]_{r=0}^{r=R}-\\frac{2}{3} \\rho U^{2} \\pi R^{2} \\\\\n& =\\frac{1}{2} \\rho U^{2} \\pi R^{2}-\\frac{2}{3} \\rho U^{2} \\pi R^{2}\n\\end{aligned}\n$$\n\n- \n\nWhich gives:\n\n$$\nF=\\frac{\\pi}{6} \\rho U^{2} R^{2}\n$$", + "b": "", + "reason": "a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one" + } +] \ No newline at end of file diff --git a/out/targets-t47.txt b/out/targets-t47.txt index 95a6995..008ac1a 100644 --- a/out/targets-t47.txt +++ b/out/targets-t47.txt @@ -40,3 +40,8 @@ differs ME2_Fluids_introduction: Question 5 "", part (c), text: the agent says differs ME2_Fluids_introduction: Question 5 "", part (c), worked solution: the agent says 'In mathematical notation we write $$ \\vec{u}(\\vec{x}, t), $$ meaning that the Eulerian vector velocity $\\vec{u}$ can be evaluated for a given point in space in a Eulerian frame of reference, $\\vec{x}$, and a point in time, $t$. This option, however, was not in the list. There is an alternative definition, which is to choose a specific particle, $\\vec{\\chi}(t)$ and a point in time, $t$, because this definition provides, implicitly, a point in space and time. It is not sufficient to define a specific particle and a point in space, firstly because the particle may not ever pass that point in space; and secondly because if it does, we cannot guarantee in general that it should pass that point once and only once, so we have not defined a unique point in time. We awarded half-points for this response because it is also not completely wrong -it is sufficient to evaluate some values of the Eulerian velocity field, but not necessarily all and not necessary unique values.' and the export says 'In mathematical notation we write $$ \\vec{u}(\\vec{x},t), $$ meaning that the Eulerian vector velocity $\\vec{u}$ can be evaluated for a given point in space in a Eulerian frame of reference, $\\vec{x}$, and a point in time, $t$. This option, however, was not in the list. There is an alternative definition, which is to choose a specific particle, $\\vec{\\chi}(t)$ and a point in time, $t$, because this definition provides, implicitly, a point in space and time. It is not sufficient to define a specific particle and a point in space, firstly because the particle may not ever pass that point in space; and secondly because if it does, we cannot guarantee in general that it should pass that point once and only once, so we have not defined a unique point in time. We awarded half-points for this response because it is also not completely wrong --- it is sufficient to evaluate some values of the Eulerian velocity field, but not necessarily all and not necessary unique values.' ME2_Fluids_introduction: 21 differ, 0 known, 21 new, 2 flagged 2 targets, 39 new differences + +The flags each target reported, from out/t47//flags.json: +flag EART40013_Mathematical_Methods_II/CW2: q1.p3.answer: "\*\*\*" before "1. " +flag ME2_Fluids_introduction: q2.p1.worked_solution: a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one +flag ME2_Fluids_introduction: q3.p1.worked_solution: a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one From cf07826cbe9037fd4f8366a647f7281c2d64c018 Mon Sep 17 00:00:00 2001 From: "Peter B. Johnson" Date: Wed, 23 Sep 2026 23:09:05 +0100 Subject: [PATCH 3/3] implement: Apply the stray-minus check to OCR markdown only (t47) --- .gitignore | 4 ++ .../CW2/flags.json | 8 ---- out/t47/ME2_Fluids_introduction/flags.json | 14 ------ out/targets-t47.txt | 47 ------------------- 4 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json delete mode 100644 out/t47/ME2_Fluids_introduction/flags.json delete mode 100644 out/targets-t47.txt diff --git a/.gitignore b/.gitignore index 6a1063e..0305b36 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ log # The default `--cache`, which a run and the tests write into the directory # they are run from. .in2lambda-agent/ +# The default `--out`: a run writes the replies, the flags and the zip of a +# private document there. A run's output is evidence for a pull request, not +# part of the repository. +out/ diff --git a/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json b/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json deleted file mode 100644 index 3a98623..0000000 --- a/out/t47/EART40013_Mathematical_Methods_II/CW2/flags.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "field": "q1.p3.answer", - "a": "$$a=\\frac{1}{6}$$$$b = \\frac{-2}{9}$$$$c = \\frac{19}{27}$$", - "b": "$$a=\\frac{1}{6}$$$$b = \\frac{-2}{9}$$$$c = \\frac{19}{27}$$\\*\\*\\*", - "reason": "\"\\*\\*\\*\" before \"1. \"" - } -] \ No newline at end of file diff --git a/out/t47/ME2_Fluids_introduction/flags.json b/out/t47/ME2_Fluids_introduction/flags.json deleted file mode 100644 index 1474e7c..0000000 --- a/out/t47/ME2_Fluids_introduction/flags.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "field": "q2.p1.worked_solution", - "a": "From mass conservation:\n\n$$\n-\\dot{m}_{a d}=\\dot{m}_{a b}+\\dot{m}_{b c}-\n$$\n\nThis becomes:\n\n$$\n-\\rho W \\int_{0}^{\\delta} U_{0} \\mathrm{~d} y=\\dot{m}_{a b}+\\rho W \\int_{0}^{\\delta} u(y) \\mathrm{d} y-\n$$\n\nSince we know that $u(y)$ is linear, we can express it in terms of $y$ and $U_{0}$ :\n\n$$\nu(y)=U_{0} \\frac{y}{\\delta},\n$$\n\nTherefore:\n\n$$\n\\begin{aligned}\n\\dot{m}_{a b} & =\\rho W U_{0}\\left(\\int_{0}^{\\delta} 1-\\frac{y}{\\delta} \\mathrm{~d} y\\right) \\\\\n\\dot{m}_{a b} & =\\rho W U_{0} \\frac{\\delta}{2} \\\\\n\\dot{m}_{a b} & =(800)(1)(3) \\frac{25 \\times 10^{-3}}{2} . \\\\\n& \\dot{m}=30 \\mathrm{~kg} / \\mathrm{s}\n\\end{aligned}\n$$", - "b": "", - "reason": "a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one" - }, - { - "field": "q3.p1.worked_solution", - "a": "The mass flow rate entering the control volume is\n\n$$\n\\dot{m}_{\\mathrm{in}}=\\rho U A_{\\mathrm{disk}}=\\rho U \\pi R^{2}\n$$\n\n- \n\n(since the velocity is uniform). The mass exiting the control volume on the left (the wake) is:\n-\n\n$$\n\\dot{m}_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R) \\mathrm{d} r\n$$\n\nHence, the mass flow rate leaving the control volume through the side $\\left(\\dot{m}_{\\text {side }}\\right)$ is:\n\n$$\n\\begin{aligned}\n\\dot{m}_{\\text {side }} & =\\dot{m}_{\\text {in }}-\\dot{m}_{\\text {wake }} \\\\\n& =\\rho U \\pi R^{2}-2 \\rho U \\pi \\int_{r=0}^{r=R} \\frac{r^{2}}{R} \\mathrm{~d} r \\\\\n& =\\rho U \\pi R^{2}-2 \\rho U \\pi\\left[\\frac{1}{3} \\frac{r^{3}}{R}\\right]_{r=0}^{r=R} \\\\\n& =\\rho U \\pi R^{2}-\\frac{2}{3} \\rho U \\pi R^{2} \\\\\n& =\\frac{1}{3} \\rho U \\pi R^{2}\n\\end{aligned}\n$$\n\nForce-momentum equation (FME):\n\nThe momentum flowrate entering the control volume is $M_{\\text {in }}=\\dot{m}_{\\text {in }} U$. The momentum flowrate exiting the control volume on the left (the wake) is\n-\n\n$$\nM_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r\n$$\n\n- \n\nThe mass leaving the control volume by the side is also contributing to the removal of momentum, $M_{\\text {side }}=\\dot{m}_{\\text {side }} U$. Hence, the momentum leaving the control volume is $M_{\\text {out }}=M_{\\text {wake }}+M_{\\text {side }}$.\n\nThe FME reads:\n-\n\n$$\nM_{\\text {out }}-M_{\\text {in }}=-F+F_{p},\n$$\n\n- \n\nwhere $F_{p}$ represents pressure forces. However, we assume the pressure to be unaffected by the presence of the submarine, which leaves the hydrostatic pressure force. Since the hydrostatic pressure has the same linear profile on both sides of the control volume (front and wake), it contributes nothing to the horizontal force. Hence:\n-\n\n$$\n\\begin{aligned}\n-F & =2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r+\\dot{m}_{\\text {side }} U-\\dot{m}_{\\text {in }} U \\\\\n& =2 \\rho U^{2} \\pi \\int_{r=0}^{r=R}\\left(r^{3} / R^{2}\\right) \\mathrm{d} r+\\frac{1}{3} \\rho U^{2} \\pi R^{2}-\\rho U^{2} \\pi R^{2} \\\\\n& =2 \\rho U^{2} \\pi\\left[\\frac{1}{4} \\frac{r^{4}}{R^{2}}\\right]_{r=0}^{r=R}-\\frac{2}{3} \\rho U^{2} \\pi R^{2} \\\\\n& =\\frac{1}{2} \\rho U^{2} \\pi R^{2}-\\frac{2}{3} \\rho U^{2} \\pi R^{2}\n\\end{aligned}\n$$\n\n- \n\nWhich gives:\n\n$$\nF=\\frac{\\pi}{6} \\rho U^{2} R^{2}\n$$", - "b": "", - "reason": "a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one" - } -] \ No newline at end of file diff --git a/out/targets-t47.txt b/out/targets-t47.txt deleted file mode 100644 index 008ac1a..0000000 --- a/out/targets-t47.txt +++ /dev/null @@ -1,47 +0,0 @@ -differs EART40013_Mathematical_Methods_II/CW2: Question 1 "", main text: the agent says 'Consider the first order non-homogeneous differential equation $$\\frac{\\text{d}y}{\\text{d}x}+6y=x^2-x+4.$$ As we saw in lectures, the general solution to problems of this form can be written as $y=y_p+y_h$, where $y_h$ is the solution to the corresponding homogenerous solution, and $y_p$ is the particular solution to the non-homogeneous problem.' and the export says 'Consider the first order non-homogeneous differential equation $$ \\frac{\\text{d}y}{\\text{d}x}+6y=x^2-x+4. $$ As we saw in lectures, the general solution to problems of this form can be written as $y=y_p+y_h$, where $y_h$ is the solution to the corresponding homogenerous solution, and $y_p$ is the particular solution to the non-homogeneous problem.' -differs EART40013_Mathematical_Methods_II/CW2: Question 1 "", part (a), worked solution: the agent says 'The homogeneous equation is \\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: \\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: This equation is solved using separation of variables: $$\\frac{\\text{d}y}{\\text{d}x}=-6y$$ $$-\\frac{1}{6} \\int \\frac{1}{y} \\, \\text{d}y = \\int \\text{d}x$$ $$-\\frac{1}{6}\\ln|y|=x+C$$ $$\\ln|y|=-6x-6C$$ $$y=e^{-6C}e^{-6x}$$ $$y_h=Ae^{-6x}$$' and the export says 'The homogeneous equation is *** *** This equation is solved using separation of variables: $$ \\frac{\\text{d}y}{\\text{d}x}=-6y $$ $$ -\\frac{1}{6} \\int \\frac{1}{y} \\, \\text{d}y = \\int \\text{d}x $$ $$ -\\frac{1}{6}\\ln|y|=x+C $$ $$ \\ln|y|=-6x-6C $$ $$ y=e^{-6C}e^{-6x} $$ $$ y_h=Ae^{-6x} $$' -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (a), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$y\'\'+y\'-6y=0$: $$\\lambda^2+\\lambda-6=0$$ $$\\lambda=-3,2$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **real roots** to the characteristic equation. This yields the general solution:$$y=Ae^{-3x}+Be^{2x}$$' and the export says "The first step is to find and solve the characteristic equation of $y''+y'-6y=0$: $$ \\lambda^2+\\lambda-6=0 $$ $$ \\lambda=-3,2 $$ *** Recall the general solution for a 2nd order homogeneous ODE with **real roots** to the characteristic equation. This yields the general solution: $$ y=Ae^{-3x}+Be^{2x} $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (b), text: the agent says "$16y''-\\pi^2y=0$ (Use $A$ and $B$ for your constants.)" and the export says "$16y''-\\pi^2y=0$ (Use $A$ and $B$ for your constants.)" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (b), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$16y\'\'-\\pi^2y=0$: $$16\\lambda^2-\\pi^2=0$$ $$\\lambda=-\\frac{\\pi}{4},\\frac{\\pi}{4}$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **real roots** to the characteristic equation. This yields the general solution:$$y=Ae^{-\\frac{\\pi}{4}x}+Be^{\\frac{\\pi}{4}x}$$' and the export says "The first step is to find and solve the characteristic equation of $16y''-\\pi^2y=0$: $$ 16\\lambda^2-\\pi^2=0 $$ $$ \\lambda=-\\frac{\\pi}{4},\\frac{\\pi}{4} $$ *** Recall the general solution for a 2nd order homogeneous ODE with **real roots** to the characteristic equation. This yields the general solution: $$ y=Ae^{-\\frac{\\pi}{4}x}+Be^{\\frac{\\pi}{4}x} $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (c), text: the agent says "$9y''-30y'+25y=0$ (Use $A$ and $B$ for your constants.)" and the export says "$9y''-30y'+25y=0$ (Use $A$ and $B$ for your constants.)" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (c), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$9y\'\'-30y\'+25y=0$: $$9\\lambda^2-30\\lambda+25=0$$ $$\\lambda=\\frac{5}{3}$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **repeated roots** to the characteristic equation. This yields the general solution:$$y=(A+Bx)e^{\\frac{5}{3}x}$$' and the export says "The first step is to find and solve the characteristic equation of $9y''-30y'+25y=0$: $$ 9\\lambda^2-30\\lambda+25=0 $$ $$ \\lambda=\\frac{5}{3} $$ *** Recall the general solution for a 2nd order homogeneous ODE with **repeated roots** to the characteristic equation. This yields the general solution: $$ y=(A+Bx)e^{\\frac{5}{3}x} $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (d), text: the agent says "$y''+2.2y'+1.17y=0,\\quad y(0)=2,\\quad y'(0)=-2.6$" and the export says "$y''+2.2y'+1.17y=0,\\quad y(0)=2,\\quad y'(0)=-2.6$ " -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (d), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$y\'\'+2.2y\'+1.17y=0$: $$\\lambda^2+2.2\\lambda+1.17=0$$ $$\\lambda=-1.3, -0.9$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **repeated roots** to the characteristic equation. This yields the general solution:$$y=Ae^{-1.3x}+Be^{-0.9x}$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Find$y\'$in order to apply the boundary condition.$$y\'=-1.3Ae^{-1.3x}-0.9Be^{-0.9x}$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Apply the boundary conditions to$y$and$y\'$to find$A=2$and$B=0$. Therefore the particular solution is:$$y=2e^{-1.3x}$$' and the export says "The first step is to find and solve the characteristic equation of $y''+2.2y'+1.17y=0$: $$ \\lambda^2+2.2\\lambda+1.17=0 $$ $$ \\lambda=-1.3, -0.9 $$ *** Recall the general solution for a 2nd order homogeneous ODE with **repeated roots** to the characteristic equation. This yields the general solution: $$ y=Ae^{-1.3x}+Be^{-0.9x} $$ *** Find $y'$ in order to apply the boundary condition. $$ y'=-1.3Ae^{-1.3x}-0.9Be^{-0.9x} $$ *** Apply the boundary conditions to $y$ and $y'$ to find $A=2$ and $B=0$. Therefore the particular solution is: $$ y=2e^{-1.3x} $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (e), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$y\'\'+y\'+2.5y=0$: $$\\lambda^2+\\lambda+2.5=0$$ $$\\lambda=-\\frac{1}{2}\\pm\\frac{3}{2}i$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution:$$y=e^{-\\frac{1}{2}x}\\bigg(A\\cos\\bigg(\\frac{3}{2}x\\bigg)+B\\sin\\bigg(\\frac{3}{2}x\\bigg)\\bigg)$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Find$y\'$in order to apply the boundary condition. $$y\'=-\\frac{1}{2} e^{-\\frac{1}{2} x}\\left(A \\cos \\left(\\frac{3}{2} x\\right)+B \\sin \\left(\\frac{3}{2} x\\right)\\right)+e^{-\\frac{1}{2} x}\\left(-\\frac{3}{2} A \\sin \\left(\\frac{3}{2} x\\right)+\\frac{3}{2} B \\cos \\left(\\frac{3}{2} x\\right)\\right)$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Apply the boundary conditions to$y$and$y\'$to find$A=1$and$B=0$. Therefore the particular solution is:$$y=e^{-\\frac{1}{2}x}\\bigg(\\cos\\bigg(\\frac{3}{2}x\\bigg)+\\sin\\bigg(\\frac{3}{2}x\\bigg)\\bigg)$$' and the export says "The first step is to find and solve the characteristic equation of $y''+y'+2.5y=0$: $$ \\lambda^2+\\lambda+2.5=0 $$ $$ \\lambda=-\\frac{1}{2}\\pm\\frac{3}{2}i $$ *** Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution: $$ y=e^{-\\frac{1}{2}x}\\bigg(A\\cos\\bigg(\\frac{3}{2}x\\bigg)+B\\sin\\bigg(\\frac{3}{2}x\\bigg)\\bigg) $$ *** Find $y'$ in order to apply the boundary condition. $$ y'=-\\frac{1}{2} e^{-\\frac{1}{2} x}\\left(A \\cos \\left(\\frac{3}{2} x\\right)+B \\sin \\left(\\frac{3}{2} x\\right)\\right)+e^{-\\frac{1}{2} x}\\left(-\\frac{3}{2} A \\sin \\left(\\frac{3}{2} x\\right)+\\frac{3}{2} B \\cos \\left(\\frac{3}{2} x\\right)\\right) $$ *** Apply the boundary conditions to $y$ and $y'$ to find $A=1$ and $B=0$. Therefore the particular solution is: $$ y=e^{-\\frac{1}{2}x}\\bigg(\\cos\\bigg(\\frac{3}{2}x\\bigg)+\\sin\\bigg(\\frac{3}{2}x\\bigg)\\bigg) $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (f), text: the agent says "$y''+4y=0,\\quad y(0)=3,\\quad y(\\frac{\\pi}{4})=-3$" and the export says "$y''+4y=0,\\quad y(0)=3,\\quad y(\\frac{\\pi}{4})=-3$ " -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (f), worked solution: the agent says 'The first step is to find and solve the characteristic equation of$y\'\'+4y=0$: $$\\lambda^2+4\\lambda=0$$ $$\\lambda=\\pm2i$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution:$$y=A\\cos(2x)+B\\sin(2x)$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Apply the boundary conditions to$y$to find$A=3$and$B=-3$. Therefore the particular solution is:$$y=3\\cos(2x)-3\\sin(2x)$$' and the export says "The first step is to find and solve the characteristic equation of $y''+4y=0$: $$ \\lambda^2+4\\lambda=0 $$ $$ \\lambda=\\pm2i $$ *** Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution: $$ y=A\\cos(2x)+B\\sin(2x) $$ *** Apply the boundary conditions to $y$ to find $A=3$ and $B=-3$. Therefore the particular solution is: $$ y=3\\cos(2x)-3\\sin(2x) $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 2 "", part (g), worked solution: the agent says "The first step is to find and solve the characteristic equation of$y''+2y'+5y=0$:$$\\lambda^2+2\\lambda+5=0$$$$\\lambda=-1\\pm2i$$--- Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution:$$y=e^{-x}\\big(A\\cos(2x)+B\\sin(2x)\\big)$$--- Apply the boundary conditions to$y$to find$A=2$but that$B$cannot be determined. This is because the boundary conditions lack sufficient information to determine all constants. Therefore we can only get as far as:$$y=e^{-x}\\big(2\\cos(2x)+B\\sin(2x)\\big)$$" and the export says "The first step is to find and solve the characteristic equation of $y''+2y'+5y=0$: $$ \\lambda^2+2\\lambda+5=0 $$ $$ \\lambda=-1\\pm2i $$ --- Recall the general solution for a 2nd order homogeneous ODE with **complex roots** to the characteristic equation. This yields the general solution: $$ y=e^{-x}\\big(A\\cos(2x)+B\\sin(2x)\\big) $$ --- Apply the boundary conditions to $y$ to find $A=2$ but that $B$ cannot be determined. This is because the boundary conditions lack sufficient information to determine all constants. Therefore we can only get as far as: $$ y=e^{-x}\\big(2\\cos(2x)+B\\sin(2x)\\big) $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 3 "", main text: the agent says "Consider the following differential equation: $$f''(r)-\\frac{5}{r} f'(r)+\\frac{8}{r^2} f(r)=0.$$" and the export says "Consider the following differential equation: $$ f''(r)-\\frac{5}{r} f'(r)+\\frac{8}{r^2} f(r)=0. $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 3 "", part (a), worked solution: the agent says 'First, compute the derivatives of the assumed solution:$$f(r)=Ar^m$$$$f\'(r)=Amr^{m-1}$$$$f\'\'(r)=Am(m-1)r^{m-2}$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Substitute these results into the differential equation:$$Am(m-1)r^{m-2}-\\frac{5}{r}Amr^{m-1}+\\frac{8}{r^2}Ar^m=0$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Cancel out the common factor$A$(assuming$A\\ne0$):$$m(m-1)r^{m-2}-\\frac{5}{r}mr^{m-1}+\\frac{8}{r^2}r^m=0$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Multiply each term by$r^2$to remove the fractions:$$m(m-1)r^{m}-5mr^{m}+8r^m=0$$\\ ::: {style="color: 0.9, 0.9, 0.9"} ------------------------------------------------------------------------ ::: Cancel out$r^m$and and simplify:$$m^2-6m+8=0$$' and the export says "First, compute the derivatives of the assumed solution: $$ f(r)=Ar^m $$ $$ f'(r)=Amr^{m-1} $$ $$ f''(r)=Am(m-1)r^{m-2} $$ *** Substitute these results into the differential equation: $$ Am(m-1)r^{m-2}-\\frac{5}{r}Amr^{m-1}+\\frac{8}{r^2}Ar^m=0 $$ *** Cancel out the common factor $A$ (assuming $A\\ne0$ ): $$ m(m-1)r^{m-2}-\\frac{5}{r}mr^{m-1}+\\frac{8}{r^2}r^m=0 $$ *** Multiply each term by $r^2$ to remove the fractions: $$ m(m-1)r^{m}-5mr^{m}+8r^m=0 $$ *** Cancel out $r^m$ and and simplify: $$ m^2-6m+8=0 $$" -differs EART40013_Mathematical_Methods_II/CW2: Question 3 "", part (b), text: the agent says 'Solve the equation that defines $m$, and thereby find the general solution to the ODE. (use $A$ and $B$ as constants in the answer box.)' and the export says 'Solve the equation that defines $m$, and thereby find the general solution to the ODE. \\ (use $A$ and $B$ as constants in the answer box.)' -differs EART40013_Mathematical_Methods_II/CW2: Question 3 "", part (b), worked solution: the agent says 'Solving$m^2-6m+8=0$yields$m=2$and$m=4$. The assumed solution was$f(r)=Ar^m$. Hence, we get two solutions$f(r)=Ar^2$and$f(r)=Br^4$. Because this is a linear ODE, then any linear combination of individual solutions is also a solution. This yields: $$f(r)=Ar^2+Br^4$$' and the export says 'Solving $m^2-6m+8=0$ yields $m=2$ and $m=4$. The assumed solution was $f(r)=Ar^m$. Hence, we get two solutions $f(r)=Ar^2$ and $f(r)=Br^4$. Because this is a linear ODE, then any linear combination of individual solutions is also a solution. This yields: $$ f(r)=Ar^2+Br^4 $$' -differs EART40013_Mathematical_Methods_II/CW2: Question 3 "", part (c), text: the agent says 'Consider that $f$ is subject to the following boundary conditions: $$f(1)=1,\\quad f(2)=8.$$ Find the arbitrary constants and and hence the specific solution.' and the export says 'Consider that $f$ is subject to the following boundary conditions: $$ f(1)=1,\\quad f(2)=8. $$ Find the arbitrary constants and and hence the specific solution.' -EART40013_Mathematical_Methods_II/CW2: 18 differ, 0 known, 18 new, 1 flagged -differs ME2_Fluids_introduction: Question 1 "", main text: the agent says 'A piston of diameter $D=0.1 \\mathrm{~m}$ is fitted inside a U-shaped tube filled with liquid mercury (with density in $\\rho_{\\mathrm{Hg}}=$ $13,540 \\mathrm{~kg} / \\mathrm{m}^{3}$ ), as shown by the sketch below. The mercury rises by $h=1 \\mathrm{~mm}$ under the weight of the piston. ![](cd151487-39b1-4f04-9cd3-f3aa8f3e7589-1.jpg)' and the export says 'A piston of diameter $D = 0.1\\space\\mathrm{m}$ is fitted inside a U-shaped tube filled with liquid mercury (with density in $\\rho_{\\small \\mathrm{Hg}} = 13,540~\\mathrm{kg/m^{3}}$), as shown by the sketch below. The mercury rises by $h=1\\space\\mathrm{mm}$ under the weight of the piston. ![](question_000_Hydraulic_scale_0001.png){ width=30% }' -differs ME2_Fluids_introduction: Question 1 "", part (a), worked solution: the agent says "The weight of the piston applies a pressure $p=4 m g /\\left(\\pi D^{2}\\right)$. This pressure adds to the atmospheric pressure, so that the pressure on the mercury on the left-hand side of the tube is $p+p_{a t}$. Applying the hydrostatic equations (or Bernoulli's equations for steady, inviscid and irrotational fluids) we find: - $$ p+p_{\\mathrm{at}}=p_{\\mathrm{at}}+\\rho_{\\mathrm{w}} \\sigma_{\\mathrm{Hg}} g h $$ where $\\sigma$ is 'specific gravity'(density relative to water). Hence: - $$ \\begin{aligned} \\frac{4 m g}{\\pi D^{2}} & =\\rho_{\\mathrm{w}} \\sigma_{\\mathrm{Hg}} g h \\\\ m & =\\frac{\\pi}{4} \\rho_{\\mathrm{w}} \\sigma_{\\mathrm{Hg}} h D^{2} \\\\ & =\\frac{\\pi}{4} * 1000 * 13.54 * 10^{-3} * 10^{-2} \\\\ & =0.106 \\mathrm{~kg} \\end{aligned} $$" and the export says "The weight of the piston applies a pressure $p = 4mg /(\\pi D^2)$. This pressure adds to the atmospheric pressure, so that the pressure on the mercury on the left-hand side of the tube is $p + p_{at}$. Applying the hydrostatic equations (or Bernoulli’s equations for steady, inviscid and irrotational fluids) we find: --- $$ p+p_{\\mathrm{at}}=p_{\\mathrm{at}}+\\rho_\\mathrm{w}\\sigma_{\\mathrm{Hg}}gh $$ where $\\sigma$ is 'specific gravity' (density relative to water). --- Hence: --- $$ \\begin{aligned}\\frac{4mg}{\\pi D^2} &= \\rho_\\mathrm{w} \\sigma_\\mathrm{\\small Hg} g h.\\\\m &= \\frac{\\pi}{4}\\rho_\\mathrm{w} \\sigma_\\mathrm{\\small Hg} h D^2 \\\\&= \\frac{\\pi}{4}* 1000 * 13.54 * 10^{-3} * 10^{-2} \\\\&= \\boxed{0.106\\,\\mathrm{kg}}\\end{aligned} $$" -differs ME2_Fluids_introduction: Question 1 "", part (b), worked solution: the agent says "To improve the accuracy of the measurement, $D$, being fixed by the piston's size, it is best to makehbigger (this is what is read), which translates in selecting a fluid with a smaller specific gravity." and the export says "To improve the accuracy of the measurement, $D$, being fixed by the piston's size, it is best to make $h$ bigger (this is what is read), which translates in **selecting a fluid with a smaller specific gravity.**" -differs ME2_Fluids_introduction: Question 2 "", main text: the agent says 'A fluid with density $\\rho=800 \\mathrm{~kg} / \\mathrm{m}^{3}$, flows at $U_{0}=3 \\mathrm{~m} / \\mathrm{s}$ over a flat plate of length $L=1 \\mathrm{~m}$ and width $W=1 \\mathrm{~m}$. At the trailing edge the boundary-layer thickness is $\\delta=25 \\mathrm{~mm}$. Assume the velocity profile at the trailing edge to be linear (in the image shown), and the flow to be two-dimensional. ![](cd151487-39b1-4f04-9cd3-f3aa8f3e7589-1-2.jpg)' and the export says 'A fluid with density $\\rho = 800\\,\\mathrm{kg/m}^3$, flows at $U_0 = 3\\,\\mathrm{m/s}$ over a flat plate of length $L = 1\\,\\mathrm{m}$ and width $W = 1\\,\\mathrm{m}$. At the trailing edge the boundary-layer thickness is $\\delta = 25\\,\\mathrm{mm}$. Assume the velocity profile at the trailing edge to be linear (in the image shown), and the flow to be two-dimensional. ![](question_001_Friction_on_a_plate_0001.png){ width=60% }' -differs ME2_Fluids_introduction: Question 2 "", part (a), text: the agent says 'Compute the mass flow rate across the top surface of the control volume (noted "ab" in the figure).' and the export says "Compute the mass flow rate across the top surface of the control volume (noted ''ab'' in the figure)." -differs ME2_Fluids_introduction: Question 2 "", part (a), worked solution: the agent says 'From mass conservation: $$ -\\dot{m}_{a d}=\\dot{m}_{a b}+\\dot{m}_{b c}- $$ This becomes: $$ -\\rho W \\int_{0}^{\\delta} U_{0} \\mathrm{~d} y=\\dot{m}_{a b}+\\rho W \\int_{0}^{\\delta} u(y) \\mathrm{d} y- $$ Since we know that $u(y)$ is linear, we can express it in terms of $y$ and $U_{0}$ : $$ u(y)=U_{0} \\frac{y}{\\delta}, $$ Therefore: $$ \\begin{aligned} \\dot{m}_{a b} & =\\rho W U_{0}\\left(\\int_{0}^{\\delta} 1-\\frac{y}{\\delta} \\mathrm{~d} y\\right) \\\\ \\dot{m}_{a b} & =\\rho W U_{0} \\frac{\\delta}{2} \\\\ \\dot{m}_{a b} & =(800)(1)(3) \\frac{25 \\times 10^{-3}}{2} . \\\\ & \\dot{m}=30 \\mathrm{~kg} / \\mathrm{s} \\end{aligned} $$' and the export says 'From mass conservation: --- $\\dot{m}_{ad}=\\dot{m}_{ab}+\\dot{m}_{bc}$ --- This becomes: --- $\\rho W\\Large{\\int}_{\\small 0}^{\\small \\delta}\\normalsize{U_0\\space \\mathrm{d}y}=\\dot{m}_{ab}+\\rho W\\Large{\\int}_{\\small 0}^{\\small \\delta}\\normalsize{u(y)\\space\\mathrm{d}y}$ --- Since we know that $u(y)$ is linear, we can express it in terms of $y$ and $U_0$: --- $$ u(y)=U_0\\frac{y}{\\delta}, $$ --- Therefore: $$ \\begin{aligned}\\dot{m}_{ab}&=\\rho W U_0\\left(\\Large{\\int}_{\\small 0}^{\\small \\delta}\\normalsize{1-\\frac{y}{\\delta}\\space\\mathrm{d}y} \\right)\\\\\\dot{m}_{ab}&=\\rho W U_0\\frac{\\delta}{2},\\\\\\dot{m}_{ab}&=(800)(1)(3)\\frac{25\\times 10^{-3}}{2}.\\end{aligned} $$ --- $$ \\dot{m}= \\boxed{30 \\space \\mathrm{kg/s} \\>} $$' -differs ME2_Fluids_introduction: Question 2 "", part (b), worked solution: the agent says 'From momentum conservation: $$ F_{\\text {fluid }}=M_{a b}+M_{b c}-M_{a d} $$ Since we are calculating the horizontal resultant force, we need to consider the horizontal momentum in the section "ab"; this means that we ignore any vertical velocities. Since the velocity of the fluid at $y=\\delta$ (i.e. at "ab") is always $U_{0}$, we can say: $$ M_{a b}=U_{0} \\dot{m}_{a b}, $$ We then also convert the other momentum flowrate terms into their mathematical forms, and proceed to find the force of the plate on the fluid, as shown below: $$ F_{\\text {fluid }}=M_{a b}+\\rho W \\int_{0}^{\\delta} u(y)^{2} \\mathrm{dy}-\\rho W \\int_{0}^{\\delta} U_{0}^{2} \\mathrm{dy} $$ $$ F_{\\text {fluid }}=U_{0} \\dot{m}_{a b}+\\rho W U_{0}^{2}\\left(\\int_{0}^{\\delta} \\frac{y^{2}}{\\delta^{2}}-1 \\mathrm{dy}\\right) $$ $$ F_{\\text {fluid }}=(3)(30)+(800)(1)(3)^{2}\\left[-\\frac{2}{3}\\left(25 \\times 10^{-3}\\right)\\right] $$ $$ F_{\\text {fluid }}=-30 \\mathrm{~N} $$ However, the question asks us to find the drag force of the fluid on the plate, hence: $$ F_{\\text {plate }}=-F_{\\text {fluid }} $$ $$ F_{\\text {plate }}=30 \\mathrm{~N} $$' and the export says 'From momentum conservation: *** *** $$ F_{\\small \\mathrm{fluid}}=M_{ab}+M_{bc}-M_{ad} $$ *** Since we are calculating the horizontal resultant force, we need to consider the horizontal momentum in the section "ab"; this means that we ignore any vertical velocities. Since the velocity of the fluid at $y=\\delta$ (i.e. at "ab") is always $U_0$, we can say: *** $$ M_{ab}=U_0\\dot{m}_{ab}, $$ *** We then also convert the other momentum flowrate terms into their mathematical forms, and proceed to find the force of the plate on the fluid, as shown below: *** $$ F_{\\mathrm{fluid}}=M_{ab}+\\rho W\\Large{\\int}_{\\small 0}^{\\small \\delta}\\normalsize{u(y)^2\\space\\mathrm{dy}}-\\rho W\\Large{\\int}_{\\small 0}^{\\small \\delta}\\normalsize{U_0^2\\space \\mathrm{dy}} $$ *** $$ F_{\\mathrm{fluid}}=U_0\\dot{m}_{ab}+\\rho WU_0^2\\left(\\LARGE{\\int}_{\\small 0}^{\\small \\delta}\\normalsize \\frac{y^2}{\\delta^2}-1\\space\\mathrm{dy} \\right) $$ *** $$ F_{\\mathrm{fluid}}=(3)(30)+(800)(1)(3)^2\\left[ -\\frac{2}{3}(25\\times 10^{-3})\\right] $$ *** $$ F_{\\mathrm{fluid}}=-30 \\space \\mathrm{N} $$ *** However, the question asks us to find the drag force **of the fluid on the plate**, hence: *** $$ F_{\\mathrm{plate}}=-F_{\\mathrm{fluid}} $$ *** $$ F_{\\mathrm{plate}}= \\boxed{30\\space \\mathrm{N}\\space} $$' -differs ME2_Fluids_introduction: Question 3 "", main text: the agent says 'A submerged submarine is towed horizontally at a steady speed $U$ in deep still water. An axially-symmetrical wake is formed behind the submarine in which the water velocity may be assumed to vary linearly from $U$ on the axis to zero at a radius of $R$. The variation of the water pressure with depth may be assumed to be unaffected by the presence of the submarine. The density of the water is $\\rho$. Using a control-volume analysis, we want to find the required power to tow the submarine. For both choices of control volumes ( A and B as shown above), derive an expression for: ![](cd151487-39b1-4f04-9cd3-f3aa8f3e7589-2.jpg)' and the export says 'A submerged submarine is towed horizontally at a steady speed $U$ in deep still water. An axially-symmetrical wake is formed behind the submarine in which the water velocity may be assumed to vary linearly from $U$ on the axis to zero at a radius of $R$. The variation of the water pressure with depth may be assumed to be unaffected by the presence of the submarine. The density of the water is $\\rho$. Using a control-volume analysis, we want to find the required power to tow the submarine. For both choices of control volumes (A and B as shown above), derive an expression for: ![](question_002_Towing_a_submarine_0001.png){ width=60% }' -differs ME2_Fluids_introduction: Question 3 "", part (a), worked solution: the agent says 'The mass flow rate entering the control volume is $$ \\dot{m}_{\\mathrm{in}}=\\rho U A_{\\mathrm{disk}}=\\rho U \\pi R^{2} $$ - (since the velocity is uniform). The mass exiting the control volume on the left (the wake) is: - $$ \\dot{m}_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R) \\mathrm{d} r $$ Hence, the mass flow rate leaving the control volume through the side $\\left(\\dot{m}_{\\text {side }}\\right)$ is: $$ \\begin{aligned} \\dot{m}_{\\text {side }} & =\\dot{m}_{\\text {in }}-\\dot{m}_{\\text {wake }} \\\\ & =\\rho U \\pi R^{2}-2 \\rho U \\pi \\int_{r=0}^{r=R} \\frac{r^{2}}{R} \\mathrm{~d} r \\\\ & =\\rho U \\pi R^{2}-2 \\rho U \\pi\\left[\\frac{1}{3} \\frac{r^{3}}{R}\\right]_{r=0}^{r=R} \\\\ & =\\rho U \\pi R^{2}-\\frac{2}{3} \\rho U \\pi R^{2} \\\\ & =\\frac{1}{3} \\rho U \\pi R^{2} \\end{aligned} $$ Force-momentum equation (FME): The momentum flowrate entering the control volume is $M_{\\text {in }}=\\dot{m}_{\\text {in }} U$. The momentum flowrate exiting the control volume on the left (the wake) is - $$ M_{\\text {wake }}=2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r $$ - The mass leaving the control volume by the side is also contributing to the removal of momentum, $M_{\\text {side }}=\\dot{m}_{\\text {side }} U$. Hence, the momentum leaving the control volume is $M_{\\text {out }}=M_{\\text {wake }}+M_{\\text {side }}$. The FME reads: - $$ M_{\\text {out }}-M_{\\text {in }}=-F+F_{p}, $$ - where $F_{p}$ represents pressure forces. However, we assume the pressure to be unaffected by the presence of the submarine, which leaves the hydrostatic pressure force. Since the hydrostatic pressure has the same linear profile on both sides of the control volume (front and wake), it contributes nothing to the horizontal force. Hence: - $$ \\begin{aligned} -F & =2 \\pi \\rho \\int_{r=0}^{r=R} r(U r / R)^{2} \\mathrm{~d} r+\\dot{m}_{\\text {side }} U-\\dot{m}_{\\text {in }} U \\\\ & =2 \\rho U^{2} \\pi \\int_{r=0}^{r=R}\\left(r^{3} / R^{2}\\right) \\mathrm{d} r+\\frac{1}{3} \\rho U^{2} \\pi R^{2}-\\rho U^{2} \\pi R^{2} \\\\ & =2 \\rho U^{2} \\pi\\left[\\frac{1}{4} \\frac{r^{4}}{R^{2}}\\right]_{r=0}^{r=R}-\\frac{2}{3} \\rho U^{2} \\pi R^{2} \\\\ & =\\frac{1}{2} \\rho U^{2} \\pi R^{2}-\\frac{2}{3} \\rho U^{2} \\pi R^{2} \\end{aligned} $$ - Which gives: $$ F=\\frac{\\pi}{6} \\rho U^{2} R^{2} $$' and the export says 'The mass flow rate entering the control volume is --- $$ \\dot{m}_{\\mathrm{in}} = \\rho U A_{\\mathrm{disk}} = \\rho U \\pi R^2 $$ --- (since the velocity is uniform). The mass exiting the control volume on the left (the wake) is: --- $$ \\dot{m}_{\\mathrm{wake}} = 2\\pi\\rho \\int_{r=0}^{r=R} r (U r /R)\\mathrm{d}r $$ --- Hence, the mass flow rate leaving the control volume through the side ($\\dot{m}_{\\mathrm{side}}$) is: --- $$ \\begin{aligned}\\dot{m}_{\\mathrm{side}} &= \\dot{m}_{\\mathrm{in}} - \\dot{m}_{\\mathrm{wake}} \\\\&= \\rho U \\pi R^2 - 2\\rho U \\pi \\int_{r=0}^{r=R} \\frac{r^2 }{R}\\mathrm{d}r \\\\&= \\rho U \\pi R^2 - 2\\rho U \\pi \\left[\\frac{1}{3}\\frac{r^3}{R}\\right]_{r=0}^{r=R}\\\\ &= \\rho U \\pi R^2 - \\frac{2}{3}\\rho U \\pi R^2 \\\\&= \\frac{1}{3}\\rho U \\pi R^2\\end{aligned} $$ --- Force-momentum equation (FME): --- The momentum flowrate entering the control volume is $M_{\\mathrm{in}} = \\dot{m}_{\\mathrm{in}} U$. The momentum flowrate exiting the control volume on the left (the wake) is --- $$ M_{\\mathrm{wake}} = 2\\pi\\rho \\int_{r=0}^{r=R} r (U r /R)^2\\mathrm{d}r. $$ --- The mass leaving the control volume by the side is also contributing to the removal of momentum, $M_{\\mathrm{side}} = \\dot{m}_{\\mathrm{side}} U$. Hence, the momentum leaving the control volume is $M_{out} = M_{\\mathrm{wake}} + M_{\\mathrm{side}}$. --- The FME reads: --- $$ M_{out} - M_{\\mathrm{in}} = - F + F_p, $$ --- where $F_p$ represents pressure forces. However, we assume the pressure to be unaffected by the presence of the submarine, which leaves the hydrostatic pressure force. Since the hydrostatic pressure has the same linear profile on both sides of the control volume (front and wake), it contributes nothing to the horizontal force. Hence: --- $$ \\begin{aligned}- F &= 2\\pi\\rho \\int_{r=0}^{r=R} r (U r /R)^2\\mathrm{d}r + \\dot{m}_{\\mathrm{side}} U - \\dot{m}_{\\mathrm{in}} U \\\\&= 2\\rho U^2 \\pi \\int_{r=0}^{r=R} (r^3/R^2)\\mathrm{d}r + \\frac{1}{3}\\rho U^2 \\pi R^2 - \\rho U^2\\pi R^2\\\\ &= 2\\rho U^2 \\pi \\left[\\frac{1}{4}\\frac{r^4}{R^2} \\right]_{r=0}^{r=R} - \\frac{2}{3}\\rho U^2 \\pi R^2 \\\\&= \\frac{1}{2}\\rho U^2 \\pi R^2 - \\frac{2}{3}\\rho U^2 \\pi R^2\\end{aligned} $$ --- Which gives: $$ \\boxed{F = \\frac{\\pi}{6}\\rho U^2 R^2} $$' -differs ME2_Fluids_introduction: Question 3 "", part (b), worked solution: the agent says 'By definition, the power is $F . U$. Therefore: $$ P=\\frac{\\pi}{6} \\rho U^{3} R^{2} $$' and the export says 'By definition, the power is $F.U$. Therefore: *** $$ \\boxed{P = \\frac{\\pi }{6}\\rho U^3 R^2} $$' -differs ME2_Fluids_introduction: Question 4 "", main text: the agent says 'Let us consider still air in standard atmospheric conditions at ground level: $T_{0}=273.15 \\mathrm{~K}, p_{0}=1.00 \\mathrm{bar}$. For simplicity, we assume air to be made of exactly the same diatomic molecules (a fair assumption) with molar mass $M=28.8 \\mathrm{~g} / \\mathrm{mol}$. Each molecule is modelled as a hard sphere of diameter $\\sigma=1.54 \\times 10^{-10} \\mathrm{~m}$. Consequently, air is considered to behave as an ideal gas. The Avogadro number is $\\mathcal{N}_{A}=6.02 \\times 10^{23} \\mathrm{~mol}^{-1}$, and the universal gas constant is $\\tilde{R}=8.314 \\mathrm{~J} /(\\mathrm{mol} \\cdot \\mathrm{K})$.' and the export says 'Let us consider still air in standard atmospheric conditions at ground level: $T_0 = 273.15\\,\\mathrm{K}$, $p_0 = 1.00\\,\\mathrm{bar}$. For simplicity, we assume air to be made of exactly the same diatomic molecules (a fair assumption) with molar mass $M = 28.8\\,\\mathrm{g/mol}$. Each molecule is modelled as a hard sphere of diameter $\\sigma = 1.54\\times 10^{-10}\\,\\mathrm{m}$. Consequently, air is considered to behave as an ideal gas. The Avogadro number is $\\mathcal{N}_A = 6.02\\times 10^{23}\\,\\mathrm{mol}^{-1}$, and the universal gas constant is $\\tilde{R} = 8.314\\,\\mathrm{J/(mol\\cdot K)}$.' -differs ME2_Fluids_introduction: Question 4 "", part (a), text: the agent says 'Calculate the number of molecules $n_{0}$ per unit volume. (Note that in the response area below you can use exponential notation, e.g. $5.7 \\mathrm{e} 13 \\mathrm{~m}^{\\wedge}(-3)$ is an acceptable input - but an incorrect answer!).' and the export says 'Calculate the number of molecules $n_{\\small 0}$ per unit volume. (Note that in the response area below you can use exponential notation, e.g. `5.7e13 m^(-3)` is an acceptable input - but an incorrect answer!).' -differs ME2_Fluids_introduction: Question 4 "", part (a), worked solution: the agent says 'The fluid density is directly related to the particle density: $\\rho_{0}=n_{0} m / V$ (assuming all molecules to be the same). In this question, we take $V$ to be a cubic meter. Therefore, we need to calculate $\\rho_{0}$ and $m$ (the mass of one molecule). The density can be computed from the ideal-gas law (the gas is assumed to be ideal): $\\rho_{0}=p_{0} /\\left(R T_{0}\\right)$ where $R=\\tilde{R} / M$. The mass is directly computed from the Avogadro number and the molecular mass: $m=M / \\mathcal{N}_{A}$. Hence: $$ n_{0}=\\frac{p_{0} \\mathcal{N}_{A} V}{\\tilde{R} T_{0}}=\\frac{\\left(10^{5}\\right)\\left(6.02 \\times 10^{23}\\right)(1)}{(8.314)(273.15)} $$ $$ n_{0} \\approx 2.65 \\times 10^{25} \\text { molecules per metre cubed } $$' and the export says 'The fluid density is directly related to the particle density: $\\rho_0 = n_{\\small 0} m /V$ (assuming all molecules to be the same). In this question, we take $V$ to be a cubic meter. Therefore, we need to calculate $\\rho_0$ and $m$ (the mass of one molecule). *** The density can be computed from the ideal-gas law (the gas is assumed to be ideal): $\\rho_0 = p_0 / (R T_0)$ where $R = \\tilde{R}/M$. *** The mass is directly computed from the Avogadro number and the molecular mass: $m = M/\\mathcal{N}_A$. *** Hence: *** $$ n_{\\small 0} = \\frac{p_0 \\mathcal{N}_A V}{\\tilde{R} T_0} = \\frac{(10^5)(6.02\\times 10^{23})(1)}{(8.314)(273.15)} $$ *** $$ n_{\\small 0}\\approx \\boxed{2.65 \\times 10^{25}\\,\\text{molecules per metre cubed} \\space} $$' -differs ME2_Fluids_introduction: Question 4 "", part (b), text: the agent says 'It can be shown that the mean-free path in the hard-sphere model is $\\ell=1 /\\left(\\sqrt{2} \\pi \\sigma^{2} n\\right)$. Give its numerical value at ground level: If we are concerned with an engineering problem with length-scale $L \\approx 1 \\mathrm{~m}$, what should the size of a fluid particle be?' and the export says 'It can be shown that the mean-free path in the hard-sphere model is $\\ell = 1/(\\sqrt{2}\\pi \\sigma^2 n)$. Give its numerical value at ground level:' -differs ME2_Fluids_introduction: Question 4 "", part (b), worked solution: the agent says '$$ \\ell_{0}=\\frac{1}{\\sqrt{2} \\pi \\sigma^{2} n_{0}}=\\frac{1}{\\sqrt{2} \\pi\\left(1.54 \\times 10^{-10}\\right)^{2}\\left(2.65 \\times 10^{25}\\right)} \\approx 3.58 \\times 10^{-7} \\mathrm{~m} $$ The fluid particle size $d$ must be such that: $$ 10^{-7} \\mathrm{~m} \\ll d \\ll 10^{0} \\mathrm{~m} \\quad \\longrightarrow \\quad 0.1 \\mathrm{~mm}/flags.json: -flag EART40013_Mathematical_Methods_II/CW2: q1.p3.answer: "\*\*\*" before "1. " -flag ME2_Fluids_introduction: q2.p1.worked_solution: a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one -flag ME2_Fluids_introduction: q3.p1.worked_solution: a stray minus sign inside or beside a display maths; Mathpix reads a separator line as one