Derive in a point a

I have this function

g(x=(Arctan(x)^2+arcsin(x/2)

I want f’(1)

when i derive i get for hand i get the same result as mathematica so correct
when i put 1 in f’(x) I get (pi/4)/2+(pi/2)/sqrt(1/4)=pi/2 + pi=3pi/2

i want to check if this is correct

  1. if i have function f(x)=3x+1 f(1)=3*1+1=4
    how do i put in the value 1 in mathematica for my function?
    or how do i derive a function in a point so the result will be a number?

of course, i can save the derivietive as a function and then put in my value for x also
cant find how i do that :frowning:
Thanks in advance

/Peter

This?

In[1]:= D[ArcTan[x]^2 + ArcSin[x/2], x]

Out[1]= 1/(2 Sqrt[1 - x^2/4]) + (2 ArcTan[x])/(1 + x^2)

In[2]:= % /. x -> 1

Out[2]= 1/Sqrt[3] + \[Pi]/4

And this:

g[x_] := ArcTan[x]^2 + ArcSin[x/2];

dg[x_] = D[g[x], x];

p1 = Plot[{g[x], dg[x]}, {x, -2, 2}, PlotLegends -> "Expressions", 
  Epilog -> {PointSize[0.02], Point[{1, g[1]}]}]

In[4]:= (* dg[x_]= was used rather than dg[x_]:= because we want the \
right hand side evaluated before the rule is defined. Look up Set and \
SetDelayed. *)

In[5]:= (* = would work here as well, but := is used more often *)
f[x_] := 3 x + 1; (* defines a function *)

In[6]:= f[a] (* evaluates it at a *)

Out[6]= 1 + 3 a

In[7]:= f[1]

Out[7]= 4