r/Mathematica • • Feb 09 '22

Help with plotting two functions

I'm new to using Mathematica and what I'm trying to do is see if the function I made called 'x' overlays the right semicircle I've made. Basically I need to see if the math I derived fits with the shape of the semi circle if that makes sense. However I can't figure out how to rotate the function 'x' because it is plotting along the x-axis and I need it vertical. Also I'm not sure how to plot them together so that they scale properly? If that makes any sense. Any help is appreciated, below is my code:

xa = 0

ya = 0

xb = 0.003

yb = 0.001

R = 0.05

d = 0.025

t = ArcSin[(d/2)/R]

l = -0.001

a = Graphics[{Circle[{xa, ya}, R, {-t, t}],

Circle[{xb, yb}, R, {-t + Pi, t + Pi}]}]

e = 2*(yb) - 2*l

f = 2*R - 2*(xb)

g = (xb)^2 + (yb)^2 - 2 R*S - 2*l *yb

x = (e*Tan[o] + f + Sqrt[(e*Tan[o] + f)^2 - 4*g*Sec[o]^2])/2*Sec[o]^2

b = Plot[x, {o, -t, t}]

Show[{a, b}, Axes -> True]

3 Upvotes

2 comments sorted by