<jupyter_start><jupyter_text>Problem 1<jupyter_code>x, y = symbols('x y')
eq = Eq(y, sympify('ln(x)'))
eq
x = solve(eq, x)[0]
x
plot(x, (y, 1, 2), xlim=(0, 3), ylim=(0, 10))
ans = integrate(mp.pi*x**2, (y, 1, 2))
ans
ans.evalf()<jupyter_output><empty_output><jupyter_text>Arrived Ans:<jupyter_code>(mp.pi*(exp(4)-exp(2))/2).evalf()<jupyter_output><empty_output><jupyter_text>Problem 2<jupyter_code>x, y0, y1, pi = symbols('x y0 y1 pi')
y0 = 6 - x**2
y0
y1 = 2
y1
eq = Eq(y0, y1)
eq
bounds = solve(eq, x)
bounds
plot((y0, (x, *bounds)), (y1, (x, *bounds)), xlim=(-3, 3), ylim=(0, 10))
ans = integrate(pi*(y0**2-y1**2), (x, -2, 2))
ans
ans.subs(pi, mp.pi)<jupyter_output><empty_output><jupyter_text>Problem 3<jupyter_code>x, y0, y1, pi, r0, r1 = symbols('x y0 y1 pi r0 r1')
y0 = x
y0
y1 = x**2
y1
eq = Eq(y0, y1)
solve(eq, x)
plot(y0, y1, xlim=(-1, 3), ylim=(0, 4))
r0 = 2 - y0
r0
r1 = 2 - y1
r1
(r1**2-r0**2).simplify()
integrate(pi*(r1**2-r0**2), x)
integrate(pi*(r1**2-r0**2), (x, 0, 1))
integrate(pi*(r0**2-r1**2), x).subs(x, 1)
integrate(pi*(r0**2-r1**2), (x, 1, sqrt(2)))
integrate(pi*r0**2, x).subs(x, sqrt(2))
ans = integrate(pi*(r1**2-r0**2), (x, 0, 1)) + integrate(pi*(r0**2-r1**2), (x, 1, sqrt(2))) + integrate(pi*r0**2, (x, sqrt(2), 2))
ans
ans.subs(pi, mp.pi).evalf()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2668195718654434, 'fraction_numerical': 0.08868501529051988, 'mean_word_length': 5.889473684210526, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '555486', 'license': 'MIT', 'n_tokens_mistral': 739, 'n_tokens_neox': 698, 'n_words': 140, 'path': 'data/TEMP.ipynb', 'repo_name': 'LE-LOY/socialsims', 'size': '1308'}